Skip to main content

Crate sonora_agc2

Crate sonora_agc2 

Source
Expand description

§sonora-agc2

crate docs BSD-3-Clause licensed Rust Version

Pure Rust implementation of Automatic Gain Control 2 (AGC2) from WebRTC.

RNN-based voice activity detection (VAD) drives an adaptive digital gain controller with limiter and clipping predictor. Includes fixed digital gain, speech level estimation, and input volume control.

Part of the Sonora audio processing library.

§License

BSD-3-Clause. See LICENSE for details.

Modules§

adaptive_digital_gain_controller
Adaptive digital gain controller.
biquad_filter
IIR biquad filter.
clipping_predictor
Clipping prediction and clipped level step estimation.
clipping_predictor_level_buffer
Circular buffer for frame-wise level metrics used by the clipping predictor.
common
AGC2 common constants and audio utility functions.
fixed_digital_level_estimator
Peak envelope level estimator with exponential smoothing.
gain_applier
Per-sample gain application with linear ramping.
interpolated_gain_curve
Interpolated gain curve using piecewise-linear under-approximation.
limiter
Output limiter with interpolated gain curve and per-sample scaling.
limiter_db_gain_curve
Limiter dB gain curve.
noise_level_estimator
Noise floor estimator based on minimum statistics.
saturation_protector
Saturation protector that recommends headroom based on recent peaks.
saturation_protector_buffer
Ring buffer for the saturation protector.
speech_level_estimator
Speech level estimator based on framewise RMS and speech probability.
vad_wrapper
Voice Activity Detector wrapper with resampling and periodic reset.