Skip to main content

Python bindings of webrtc audio processing

Project description

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()))

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 details)

Uploaded Source

Built Distributions

File details

Details for the file webrtc_audio_processing-0.1.3.tar.gz.

File metadata

File hashes

Hashes for webrtc_audio_processing-0.1.3.tar.gz
Algorithm Hash digest
SHA256 247a8fe4567317b200839b46c93310deed15e8c0ec34a83c6d1b595a5df71754
MD5 a2ebe4a4b8fa9a43516e2e297ef10403
BLAKE2b-256 ca0beeca6ad8a7cabf3c6da8515700b7a29690269e3aae1e96ea24db1a466ad9

See more details on using hashes here.

File details

Details for the file webrtc_audio_processing-0.1.3-cp36-cp36m-linux_armv7l.whl.

File metadata

  • Download URL: webrtc_audio_processing-0.1.3-cp36-cp36m-linux_armv7l.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for webrtc_audio_processing-0.1.3-cp36-cp36m-linux_armv7l.whl
Algorithm Hash digest
SHA256 06e09bc985cb698d827f458d08d9fecc613f8270e82f6c799da95963c8ae6de7
MD5 b33c4a57f5e00d3422bc77cd60d3b511
BLAKE2b-256 1f4f8b9d5d23e67b6e455801878a7e8b34bbe6c10686598c2fc69fe23b785591

See more details on using hashes here.

File details

Details for the file webrtc_audio_processing-0.1.3-cp27-cp27mu-linux_armv7l.whl.

File metadata

File hashes

Hashes for webrtc_audio_processing-0.1.3-cp27-cp27mu-linux_armv7l.whl
Algorithm Hash digest
SHA256 5483d564d5b500d636d2660536a274278ed7b604839ee54f1992c908e1a92d4e
MD5 12b7ddcb66f2c17a6658452c0dcc7d81
BLAKE2b-256 41cf2240617fe821590ebd5c2c77361b67f81a8be2a42e7e44ea83b754e314ca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page