{"id":16054990,"url":"https://github.com/xiongyihui/python-webrtc-audio-processing","last_synced_at":"2025-04-05T10:09:34.931Z","repository":{"id":62588551,"uuid":"83033771","full_name":"xiongyihui/python-webrtc-audio-processing","owner":"xiongyihui","description":"Python bindings of WebRTC Audio Processing","archived":false,"fork":false,"pushed_at":"2024-09-09T14:12:08.000Z","size":1129,"stargazers_count":168,"open_issues_count":8,"forks_count":51,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-16T02:24:30.624Z","etag":null,"topics":["agc","ns","python","vad","webrtc-audio-processing"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiongyihui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-24T11:14:54.000Z","updated_at":"2024-10-10T02:13:26.000Z","dependencies_parsed_at":"2024-10-25T17:06:58.793Z","dependency_job_id":null,"html_url":"https://github.com/xiongyihui/python-webrtc-audio-processing","commit_stats":{"total_commits":22,"total_committers":4,"mean_commits":5.5,"dds":0.2727272727272727,"last_synced_commit":"b477187a2b91ca1dbeb5239b7ca6697378a31a8b"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongyihui%2Fpython-webrtc-audio-processing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongyihui%2Fpython-webrtc-audio-processing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongyihui%2Fpython-webrtc-audio-processing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongyihui%2Fpython-webrtc-audio-processing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiongyihui","download_url":"https://codeload.github.com/xiongyihui/python-webrtc-audio-processing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318745,"owners_count":20919484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agc","ns","python","vad","webrtc-audio-processing"],"created_at":"2024-10-09T02:05:11.699Z","updated_at":"2025-04-05T10:09:34.906Z","avatar_url":"https://github.com/xiongyihui.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebRTC Audio Processing for Python\n\n[![Build Status](https://travis-ci.org/xiongyihui/python-webrtc-audio-processing.svg?branch=master)](https://travis-ci.org/xiongyihui/python-webrtc-audio-processing)\n[![Pypi](https://img.shields.io/pypi/v/webrtc_audio_processing.svg)](https://pypi.python.org/pypi/webrtc_audio_processing)\n\nPython binding of WebRTC Audio Processing.\n\n## Requirements\n+ swig\n+ compile toolchain\n+ python\n\n## Build\nThere are two way to build the package.\n\n1. using setup.py\n\n    ```bash\n    git clone https://github.com/xiongyihui/python-webrtc-audio-processing.git\n    cd python-webrtc-audio-processing\n    git submodule init \u0026\u0026 git submodule update\n    python setup.py build\n    sudo python setup.py install\n    ```\n\n2. using Makefile\n\n    ```bash\n    git clone https://github.com/xiongyihui/python-webrtc-audio-processing.git\n    cd python-webrtc-audio-processing\n    git submodule init \u0026\u0026 git submodule update\n    cd webrtc-audio-processing\n    ./autogen.sh\n    ./configure --with-pic\n    make\n    cd ../src\n    make\n    ```\n\n## Usage\n```python\nfrom webrtc_audio_processing import AudioProcessingModule as AP\n\nap = AP(enable_vad=True, enable_ns=True)\nap.set_stream_format(16000, 1)      # set sample rate and channels\nap.set_ns_level(1)                  # NS level from 0 to 3\nap.set_vad_level(1)                 # VAD level from 0 to 3\n\naudio_10ms = '\\0' * 160 * 2         # 10ms, 16000 sample rate, 16 bits, 1 channel\n\n# only support processing 10ms audio data each time\naudio_out = ap.process_stream(audio_10ms)\nprint('voice: {}'.format(ap.has_voice()))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiongyihui%2Fpython-webrtc-audio-processing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiongyihui%2Fpython-webrtc-audio-processing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiongyihui%2Fpython-webrtc-audio-processing/lists"}