Skip to main content

Module preprocessing

Module preprocessing 

Source
Expand description

Audio preprocessing pipeline for improving VAD accuracy.

This module provides configurable preprocessing stages that clean audio before voice activity detection. Each stage is optional and can be enabled/disabled via PreprocessorConfig.

§Example

use wavekat_vad::preprocessing::{Preprocessor, PreprocessorConfig};

let config = PreprocessorConfig {
    high_pass_hz: Some(80.0),
    ..Default::default()
};

let mut preprocessor = Preprocessor::new(&config, 16000);
let samples: Vec<i16> = vec![0; 320]; // 20ms at 16kHz
let cleaned = preprocessor.process(&samples);

Structs§

BiquadFilter
Second-order (biquad) IIR filter.
Normalizer
Audio normalizer that adjusts amplitude to a target dBFS level.
Preprocessor
Audio preprocessor that applies configured processing stages.
PreprocessorConfig
Configuration for the audio preprocessor.