#webrtc #non-linear #voice-detection #web-rtc


A wrapper for WebRTC's AudioProcessing module

9 releases

0.4.0 May 16, 2022
0.3.3 Aug 25, 2020
0.3.1 Apr 22, 2020
0.2.0 Jan 30, 2020
0.1.1 Dec 9, 2019

#227 in Audio

Download history 5/week @ 2023-08-08 21/week @ 2023-08-15 16/week @ 2023-08-22 8/week @ 2023-08-29 21/week @ 2023-09-05 27/week @ 2023-09-12 16/week @ 2023-09-19 10/week @ 2023-09-26 5/week @ 2023-10-03 7/week @ 2023-10-10 13/week @ 2023-10-17 17/week @ 2023-10-24 17/week @ 2023-10-31 5/week @ 2023-11-07 15/week @ 2023-11-14 17/week @ 2023-11-21

55 downloads per month

Custom license


C++ 3.5K SLoC // 0.1% comments C 2.5K SLoC // 0.2% comments Rust 860 SLoC // 0.0% comments Automake 323 SLoC // 0.0% comments Shell 4 SLoC


Crates.io Docs.rs Build Status dependency status

A wrapper around PulseAudio's repackaging of WebRTC's AudioProcessing module.

webrtc-audio-processing can remove echo from an audio input stream in the situation where a speaker is feeding back into a microphone, as well as noise-removal, auto-gain-control, voice-activity-detection, and more!

Example Usage

See examples/simple.rs for an example of how to use this crate.


Feature Flags

  • bundled - Build webrtc-audio-procesing from the included C++ code
  • derive_serde - Derive serialize and deserialize traits for Serde use

Dynamic linking

By default the build will attempt to dynamically link with the library installed via your OS's package manager.

You can specify an include path yourself by setting the environment variable WEBRTC_AUDIO_PROCESSING_INCLUDE.


sudo apt install webrtc-audio-processing-dev # Ubuntu/Debian
sudo pacman -S webrtc-audio-processing # Arch

Build from source

The webrtc source code is included as a git submodule. Be sure to clone this repo with the --recursive flag, or pull the submodule with git submodule update --init.

Building from source and static linking can be enabled with the bundled feature flag. You need the following tools to build from source:

  • clang or gcc
  • autotools (MacOS: brew install automake, brew install autoconf)
  • libtoolize (typically glibtoolize on MacOS: brew install libtool)
  • pkg-config (MacOS: brew install pkg-config)


Version increment

We are using semantic versioning. When incrementing a version, please do so in a separate commit, and also mark it with a Github tag.


~56K SLoC