Expand description
WaveKat VAD — Unified voice activity detection with multiple backends.
This crate provides a common VoiceActivityDetector trait with
implementations for different VAD backends, enabling experimentation
and benchmarking across technologies.
§Backends
| Backend | Feature | Description |
|---|---|---|
| WebRTC | webrtc (default) | Google’s WebRTC VAD — fast, binary output |
| Silero | silero | Neural network via ONNX Runtime — higher accuracy, continuous probability |
| TEN-VAD | ten-vad | Agora’s TEN-VAD via ONNX — pure Rust, no C dependency |
§Feature flags
webrtc(default) — WebRTC VAD backendsilero— Silero VAD backend (downloads ONNX model at build time)ten-vad— TEN-VAD backend (downloads ONNX model at build time)denoise— RNNoise-based noise suppression in the preprocessing pipelineserde—Serialize/Deserializeimpls for config types
§TEN-VAD model license
The TEN-VAD ONNX model is licensed under Apache-2.0 with a non-compete clause by the TEN-framework / Agora. It restricts deployment that competes with Agora’s offerings. Review the TEN-VAD license before using in production.
§Example
use wavekat_vad::VoiceActivityDetector;
use wavekat_vad::backends::webrtc::{WebRtcVad, WebRtcVadMode};
let mut vad = WebRtcVad::new(16000, WebRtcVadMode::Quality).unwrap();
let samples = vec![0i16; 160]; // 10ms at 16kHz
let probability = vad.process(&samples, 16000).unwrap();
println!("Speech probability: {probability}");Re-exports§
pub use adapter::FrameAdapter;pub use error::VadError;
Modules§
- adapter
- Frame adapter for matching audio frames to VAD backend requirements.
- backends
- error
- frame
- preprocessing
- Audio preprocessing pipeline for improving VAD accuracy.
Structs§
- VadCapabilities
- Describes the audio requirements of a VAD backend.
Traits§
- Voice
Activity Detector - Common interface for voice activity detection backends.