Skip to main content

Module noise_estimate

Module noise_estimate 

Source
Expand description

Adaptive noise-floor estimation by minimum statistics.

The quietest recent frames are, with high probability, noise-only. Tracking the minimum short-term energy over a trailing window therefore yields a robust estimate of the noise level that follows slow drifts (fans, hiss, room tone) without ever being pulled up by transient speech or tones.

The raw minimum systematically under-estimates the mean noise power (it is an extreme-order statistic), so it is multiplied by a fixed bias-compensation factor to recover an estimate of the floor an activity gate should clear.

Zero-heap: a single pass over a caller-supplied energy slice. Stateless, so callers stream by keeping their own small ring of recent per-frame energies (see crate::features::vad::segment_voiced).

Constants§

NOISE_BIAS
Bias compensation for the minimum-of-window estimator.

Functions§

noise_floor_min_stat
Estimate the noise floor as the bias-compensated minimum energy over the trailing window entries of energies (per-frame RMS or power values).