webrtc音频处理的python绑定

webrtc-audio-processing的Python项目详细描述


用于Python的WebRTC音频处理

Build StatusPypi

WebRTC音频处理的Python绑定。

要求

  • 开关量
  • 编译工具链
  • Python

构建

有两种方法可以构建包。

  1. 使用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. 使用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
    

用法

fromwebrtc_audio_processingimportAudioProcessingModuleasAPap=AP(enable_vad=True,enable_ns=True)ap.set_stream_format(16000,1)# set sample rate and channelsap.set_ns_level(1)# NS level from 0 to 3ap.set_vad_level(1)# VAD level from 0 to 3audio_10ms='\0'*160*2# 10ms, 16000 sample rate, 16 bits, 1 channel# only support processing 10ms audio data each timeaudio_out=ap.process_stream(audio_10ms)print('voice: {}'.format(ap.has_voice()))

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何在安卓中通过程序禁用消息通知?   Java中的jna处理器乘法器   java Im将图像存储在数据库中,但被替换   java REST到SOAP头   web服务如何在java中使用web服务?   java如何在从Rest控制器返回对象层次结构时使用SpringMVC@JsonView   java SpringApplicationBuilder在与JUnit SpringRunner的集成测试期间未加载   java当您超出“短”范围时会发生什么?   java如何在同一类中的方法中调用构造函数?   java创建不必要的字符串对象   java httpClient连接池管理器validateAfterInactivity   多线程Java是否提供了一个ExecutorService,允许工人在同一线程上执行?   在Java中使用非字符串值创建MongoDB文档   java addView()不显示该视图   JavaTictactoe字符覆盖   java如何使用spark UDF返回复杂类型   java如何在安卓 studio的弹出窗口中添加带滚动的listView?