프로젝트
GitHub에서 보기
xiongyihui/python-webrtc-audio-processing
소개
Python bindings of WebRTC Audio Processing
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalWebRTC 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 installusing 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()))
관련 프로젝트 살펴보기
불러오는 중…