Python bindings of webrtc audio processing
Project description
WebRTC Audio Processing for Python
Python binding of WebRTC Audio Processing.
Requirements
- swig
- compile toolchain
- python
Build
There are two way to build the package.
-
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
-
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()))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
webrtc_audio_processing-0.1.3.tar.gz
(611.2 kB
view hashes)
Built Distributions
Close
Hashes for webrtc_audio_processing-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 247a8fe4567317b200839b46c93310deed15e8c0ec34a83c6d1b595a5df71754 |
|
MD5 | a2ebe4a4b8fa9a43516e2e297ef10403 |
|
BLAKE2b-256 | ca0beeca6ad8a7cabf3c6da8515700b7a29690269e3aae1e96ea24db1a466ad9 |
Close
Hashes for webrtc_audio_processing-0.1.3-cp36-cp36m-linux_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06e09bc985cb698d827f458d08d9fecc613f8270e82f6c799da95963c8ae6de7 |
|
MD5 | b33c4a57f5e00d3422bc77cd60d3b511 |
|
BLAKE2b-256 | 1f4f8b9d5d23e67b6e455801878a7e8b34bbe6c10686598c2fc69fe23b785591 |
Close
Hashes for webrtc_audio_processing-0.1.3-cp27-cp27mu-linux_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5483d564d5b500d636d2660536a274278ed7b604839ee54f1992c908e1a92d4e |
|
MD5 | 12b7ddcb66f2c17a6658452c0dcc7d81 |
|
BLAKE2b-256 | 41cf2240617fe821590ebd5c2c77361b67f81a8be2a42e7e44ea83b754e314ca |