Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
snakers4
GitHub Repository: snakers4/silero-vad
Path: blob/master/examples/rust-wav-processing-with-wavekat-vad/README.md
2379 views

Rust example using wavekat-vad

Uses wavekat-vad, a Rust library that provides a unified interface for multiple VAD backends including Silero VAD. The Silero ONNX model is downloaded and embedded in the binary at compile time — no manual model setup needed.

Features

  • Automatic resampling from any sample rate to 16kHz

  • FrameAdapter handles frame buffering (feed any chunk size, get correctly sized frames)

  • Works with any WAV file format (mono/stereo, any sample rate)

Usage

cargo run -- /path/to/audio.wav

Sample output:

File: audio.wav (16000Hz, 1ch, 16bit) Duration: 3.50s (56000 samples at 16000Hz) Silero VAD — frame: 512 samples (32ms) 0ms 0.012 20ms 0.008 40ms 0.245 60ms 0.876 ################################### SPEECH 80ms 0.923 #################################### SPEECH ...