pub struct PreprocessorConfig {
pub high_pass_hz: Option<f32>,
pub denoise: bool,
pub normalize_dbfs: Option<f32>,
}Expand description
Configuration for the audio preprocessor.
All fields are optional. Set to None or false to disable a stage.
Fields§
§high_pass_hz: Option<f32>High-pass filter cutoff frequency in Hz.
Removes low-frequency noise (HVAC, rumble) that can cause false positives.
Recommended: 80Hz for raw mic input, 200Hz for telephony.
Set to None to disable.
denoise: boolEnable RNNoise-based noise suppression.
Suppresses stationary background noise while preserving speech.
Requires the denoise feature flag. Works at any sample rate
(automatically resamples to 48kHz internally if needed).
normalize_dbfs: Option<f32>Target level for RMS normalization in dBFS.
Normalizes audio amplitude so VAD thresholds work consistently.
Recommended: -20.0 dBFS. Set to None to disable.
Implementations§
Source§impl PreprocessorConfig
impl PreprocessorConfig
Sourcepub fn raw_mic() -> Self
pub fn raw_mic() -> Self
Preset for raw microphone input.
Enables high-pass filter at 80Hz and normalization to -20 dBFS.
With denoise feature, also enables noise suppression.
Sourcepub fn telephony() -> Self
pub fn telephony() -> Self
Preset for telephony audio.
Light high-pass at 200Hz (telephony is already bandpass filtered).
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns true if any preprocessing is enabled.
Trait Implementations§
Source§impl Clone for PreprocessorConfig
impl Clone for PreprocessorConfig
Source§fn clone(&self) -> PreprocessorConfig
fn clone(&self) -> PreprocessorConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more