Expand description
Audio normalization with RMS targeting and peak limiting.
This module provides intelligent audio level normalization that:
- Targets a configurable RMS level (e.g., -20 dBFS)
- Prevents clipping with hard peak limiting at ±1.0
- Enforces maximum gain ceiling to avoid over-amplification
- Handles silence and very quiet audio gracefully
§Example
use speech_prep::preprocessing::Normalizer;
let normalizer = Normalizer::new(0.5, 10.0)?;
let quiet_audio = vec![0.1f32; 1000];
let normalized = normalizer.normalize(&quiet_audio)?;Structs§
- Normalizer
- Audio normalizer with RMS targeting and peak limiting.