pump_processed

Function pump_processed 

Source
pub fn pump_processed(
    handle: &LiveHandle,
    mic: Receiver<Vec<i16>>,
    mic_hz: u32,
    processors: Vec<Box<dyn InputAudioProcessor>>,
    speaker: Sender<Playback>,
    speaker_hz: u32,
) -> VoicePump
Expand description

pump, with a chain of InputAudioProcessors applied to each microphone frame before resampling — the insertion point for denoisers and client-side voice-activity gates. Processors run in order at the mic’s native rate; an emptied frame (all-zero) still flows, so the session’s own VAD sees continuous audio.

This is the seam third-party audio front-ends plug into — a DeepFilterNet-style denoiser, a Silero-style VAD gate, a proprietary vendor SDK — each as one impl InputAudioProcessor with no changes to the pump. Evaluate candidates with the same recorded call set on both transcription accuracy and added latency: a stage that cleans the audio but spends 200 ms per frame defeats the point.