GithubHelp home page GithubHelp logo

whu933314 / python-webrtc-audio-processing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xiongyihui/python-webrtc-audio-processing

0.0 0.0 0.0 1.1 MB

Python bindings of WebRTC Audio Processing

Python 26.47% Makefile 5.47% C++ 68.06%

python-webrtc-audio-processing's Introduction

WebRTC Audio Processing for Python

Build Status Pypi

Python binding of WebRTC Audio Processing.

Requirements

  • swig
  • compile toolchain
  • python

Build

There are two way to build the package.

  1. using setup.py

    git clone https://github.com/xiongyihui/python-webrtc-audio-processing.git
    cd python-webrtc-audio-processing
    git submodule init && git submodule update
    python setup.py build
    sudo python setup.py install
  2. using Makefile

    git clone https://github.com/xiongyihui/python-webrtc-audio-processing.git
    cd python-webrtc-audio-processing
    git submodule init && git submodule update
    cd webrtc-audio-processing
    ./autogen.sh
    ./configure --with-pic
    make
    cd ../src
    make

Usage

from webrtc_audio_processing import AudioProcessingModule as AP

ap = AP(enable_vad=True, enable_ns=True)
ap.set_stream_format(16000, 1)      # set sample rate and channels
ap.set_ns_level(1)                  # NS level from 0 to 3
ap.set_vad_level(1)                 # VAD level from 0 to 3

audio_10ms = '\0' * 160 * 2         # 10ms, 16000 sample rate, 16 bits, 1 channel

# only support processing 10ms audio data each time
audio_out = ap.process_stream(audio_10ms)
print('voice: {}'.format(ap.has_voice()))

python-webrtc-audio-processing's People

Contributors

xiongyihui avatar aculeasis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.