flexaudio-vad
Offline Voice Activity Detection for Rust, powered by the Silero VAD model
running on ONNX Runtime. The model is embedded into the binary via
include_bytes!, so detection runs fully offline — no model file to ship and
no network access at runtime.
This crate is independent of flexaudio-core: it consumes a plain &[f32]
sample stream, so you can pair it with any audio source.
Streaming example
use ;
let mut vad = new.unwrap;
for chunk in some_audio_chunks
#
Batch example
use ;
let samples: = vec!;
let segments = get_speech_timestamps.unwrap;
for s in segments
VadConfig ships aggressive(), balanced(), and conservative() presets.
Input is expected as 16 kHz mono f32.
Install
MSRV
Rust 1.88 (required by the ort / ONNX Runtime toolchain).
License & third-party notices
MIT © 2026 tubome / Studio Sadola.
This crate redistributes the Silero VAD model (MIT) and a statically linked
build of Microsoft ONNX Runtime (MIT) inside every binary. You MUST ship the
accompanying notices — see THIRD_PARTY_NOTICES.md.
The ONNX Runtime ThirdPartyNotices.txt for the pinned release still needs to be
attached (legal review); this is flagged in that file.