Skip to main content

Noise suppression and automatic gain with webrtc

Project description

webrtc-noise-gain

Tiny Python wrapper around webrtc-audio-processing for noise suppression and auto gain only.

Install

pip install webrtc-noise-gain

Usage

from webrtc_noise_gain import AudioProcessor

# 0 = disable
auto_gain_dbfs = 3  # [0, 31]

# 0 = disable, 4 is max suppression
noise_suppression_level = 2  # [0, 4]

# 16 Khz mono with 16-bit samples only
audio_processor = AudioProcessor(auto_gain_dbfs, noise_suppression_level)

# Operates on 10ms of audio at a time (160 samples @ 16Khz)
audio_bytes_10ms = ...  # 160 samples (320 bytes)

result = audio_processor.Process10ms(audio_bytes_10ms)

if result.is_speech:
    # True if VAD detected speech

# result.audio contains clean audio

Building

# Install system dependencies
sudo apt-get install python3 python3-dev python3-pip python3-venv build-essential

# Clone repo
git clone http://github.com/rhasspy/webrtc-noise-gain.git
cd webrtc-noise-gain

# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
pip3 install --upgrade pip
pip3 install --upgrade wheel build

# Build
python3 -m build --wheel
find dist/

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_noise_gain-1.3.0.tar.gz (3.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

webrtc_noise_gain-1.3.0-cp39-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

webrtc_noise_gain-1.3.0-cp39-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (8.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file webrtc_noise_gain-1.3.0.tar.gz.

File metadata

  • Download URL: webrtc_noise_gain-1.3.0.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for webrtc_noise_gain-1.3.0.tar.gz
Algorithm Hash digest
SHA256 67c96337db3b074a7a5dce0936c98a93886f22a0724e4387198ae86f31914643
MD5 e86e71f21bf046de9530143e9c70dac6
BLAKE2b-256 e570675fc3b28b7212f32959dd222bce6e753f235a9fcccc924826e135302e66

See more details on using hashes here.

Provenance

The following attestation bundles were made for webrtc_noise_gain-1.3.0.tar.gz:

Publisher: publish.yml on OHF-Voice/webrtc-noise-gain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webrtc_noise_gain-1.3.0-cp39-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for webrtc_noise_gain-1.3.0-cp39-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3d052501c2cbe4948101e011450e93bff22b800f89014f192dfb861e319522a3
MD5 b2de3788d0a182f848926b713ac76f74
BLAKE2b-256 3c0fb475e7c58de013d634df63da60e3d9a81601d8416c212739ab0eeb21e478

See more details on using hashes here.

Provenance

The following attestation bundles were made for webrtc_noise_gain-1.3.0-cp39-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yml on OHF-Voice/webrtc-noise-gain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webrtc_noise_gain-1.3.0-cp39-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for webrtc_noise_gain-1.3.0-cp39-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ba7df808439bae994459be7e916802e384ffa4f0e750035b5284f7fe4ff466dc
MD5 b549f472752d4b9bfcc735c7d5b9197b
BLAKE2b-256 bce2711f829859a869aeda2dd58bc9eed32261418c5d1942b2d7929056fe74a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for webrtc_noise_gain-1.3.0-cp39-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yml on OHF-Voice/webrtc-noise-gain

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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