voice_activity_detector
Library Listed Dormant
Voice Activity Detector using the Silero VAD model.
- Downloads
- 36,149
- Dependents
- 11
- Stars
- 64
- Forks
- 19
- Contributors
- 6
- Commits
- 28
- Latest release
- 0.2.1 ยท
About
Provides a model and extensions for detecting speech in audio.
Standalone Voice Activity Detector
This crate provides a standalone Voice Activity Detector (VAD) which can be used to predict speech in a chunk of audio. This implementation uses the Silero VAD.
The VAD predicts speech in a chunk of Linear Pulse Code Modulation (LPCM) encoded audio samples. These may be 8 or 16 bit integers or 32 bit floats.
This project now uses the Silero VAD V5 model. The model only supports fixed window sizes: for 8 kHz sample rate, only a 256-sample window is allowed; for 16 kHz sample rate, only a 512-sample window is allowed.
The samples passed to predict will be truncated or padded if they are not of the correct length.
fn main() -> Result<(), voice_activity_detector::Error> {
use voice_activity_detector::{VoiceActivityDetector};
let chunk = vec![0i16; 512];
let mut vad = VoiceActivityDetector::builder()
.sample_rate(8000)
.chunk_size(512usize)
.build()?;
let probability = vad.predict(chunk);
println!("probability: {}", probability);
Ok(())
}
Read the full README
Extensions
Some extensions have been added for dealing with streams of audio. These extensions have variants to work with both Iterators and Async Iterators (Streams) of audio samples. The Stream utilities are enabled as part of the async feature.
Predict Iterator/Stream
The PredictIterator and PredictStream work on an iterator/stream of samples, and return an iterator/stream containing a tuple of a chunk of audio and its probability of speech. Be sure to use the IteratorExt and StreamExt traits to bring the predict function on iterators into scope.
fn main() -> Result<(), voice_activity_detector::Error> {
use voice_activity_detector::{IteratorExt, VoiceActivityDetector};
let samples = [0i16; 5120];
let mut vad = VoiceActivityDetector::builder()
.sample_rate(8000)
.chunk_size(512usize)
.build()?;
let probabilities = samples.into_iter().predict(&mut vad);
for (chunk, probability) in probabilities {
if probability > 0.5 {
println!("speech detected!");
}
}
Ok(())
}
Label Iterator/Stream
The LabelIterator and LabelStream also work on an iterator/stream of samples. Rather than returning just the probability of speech for each chunk, these return labels of speech or non-speech. This helper allows adding additional padding to speech chunks to prevent sudden cutoffs of speech.
threshold: Value between 0.0 and 1.0. Probabilties greater than or equal to this value will be considered speech.padding_chunks: Adds additional chunks to the start and end of speech chunks.
fn main() -> Result<(), voice_activity_detector::Error> {
use voice_activity_detector::{LabeledAudio, IteratorExt, VoiceActivityDetector};
let samples = [0i16; 51200];
let mut vad = VoiceActivityDetector::builder()
.sample_rate(8000)
.chunk_size(512usize)
.build()?;
// This will label any audio chunks with a probability greater than 75% as speech,
// and label the 3 additional chunks before and after these chunks as speech.
let labels = samples.into_iter().label(&mut vad, 0.75, 3);
for label in labels {
match label {
LabeledAudio::Speech(_) => println!("speech detected!"),
LabeledAudio::NonSpeech(_) => println!("non-speech detected!"),
}
}
Ok(())
}
Feature Flags
async: Enables the structs and functions to work with::future::Stream.load-dynamic: By default, this library downloads prebuilt ONNX Runtime from Microsoft. This is convenient and works out of the box for most use cases. For the use cases that require more control, this feature flag enables theload-dynamicfeature flag for theortlibrary. From the ort library documentation:
This doesn't link to any dynamic libraries, instead loading the libraries at runtime using dlopen(). This can be used to control the path to the ONNX Runtime binaries (meaning they don't always have to be directly next to your executable), and avoiding the shared library hell. To use this, enable the load-dynamic Cargo feature, and set the ORT_DYLIB_PATH environment variable to the path to your onnxruntime.dll/libonnxruntime.so/libonnxruntime.dylib - you can also use relative paths like ORT_DYLIB_PATH=./libonnxruntime.so (it will be relative to the executable). For convenience, you should download or compile ONNX Runtime binaries, put them in a permanent location, and set the environment variable permanently.
More Examples
Please see the tests directory for more examples.
Limitations
The voice activity detector and helper functions work only on mono-channel audio streams. If your use case involves multiple channels, you will need to split the channels and potentially interleave them again depending on your needs.
We have also currently not verified functionality with all platforms, here is what we tested: | Windows | macOS | Linux | | :-----: | :---: | :---: | | ๐ข | ๐ข | ๐ข |
๐ข = Available
๐ต = Currently in the works
๐ก = Currently not tested
๐ด = Not working currently (possible in the future)
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- Required
- Binds native code: ort-sys
- Python bindings
- No Python binding crate found
- License
- MIT
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
Voice Activity Detector using the Silero VAD model. |
36,149 downloads over 30 days | 11 | 64 | 0.2.1 | GPU support unknown | Binds native code: ort-sys | MIT |
|
earshot Featured
Ridiculously fast & accurate voice activity detection in pure Rust |
164,695 downloads over 30 days | 14 | 242 | 1.2.2 | GPU support unknown | No native code found | Apache-2.0 OR MIT |
|
Rust interface for the WebRTC Voice-Activity-Detction Module |
60,022 downloads over 30 days | 7 | 31 | 0.4.0 | GPU support unknown | Build uses a native toolchain: cc | MIT |
|
silero Listed
Production-oriented Rust wrapper for the Silero VAD ONNX model. |
1,888 downloads over 30 days | 3 | 6 | 0.7.0 | CUDA, ROCm | Binds native code: ort-sys (feature coreml) | Apache-2.0 OR MIT |
|
A Rust implementation of the Qwen3 Text-to-Speech (TTS) model inference. |
204 binary downloads per release | Not applicable | 237 | Not measured | Not measured | None stated | |
|
voxr New
Audio and speech on boostr: compressed-audio decode, resampling, DSP and grapheme to phoneme, with speech synthesis (Kokoro, VITS), voice cloning (VoxCPM2), transcription with word timings (Whisper), voice activity (Silero) and audio-text scoring (CLAP), on CPU or CUDA. |
642 downloads over 30 days | 2 | 2 | 0.9.1 | CUDA | No native code found | Apache-2.0 |
Why ListedNo archive, New or Featured rule places it, so it is Listed.
What it lacks for Featured
- It has 7 active dependents and 7 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 64 stars, 19 forks and 6 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
- The project is dormant and not finished. Dormancy rule
What else the check found
- The last activity is on 4 Aug 2025, 462 days ago. That reaches the 365 days the rules expect, so the project is dormant. Dormancy rule
Not measured: Latest release fails cargo check.
Exact rules: Listed, Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.2.1 base 300, raised to the 365-day floor: E = 365 daysdormancy: last activity 2025-08-04, 462 days ago, E = 365: dormantfeatured: not featured: active_users 7 < 11 and new_adopters 7 < 9 and repository route stars 64 (needs 4539), forks 19 (needs 434), contributors 6 (needs 79); dormant and not stablelisted: listed: no archive, new or featured rule applies
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption7 active dependents, 7 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 7 | crates.io database dump | Yes | |
| New dependents (365 days) | 7 | crates.io database dump | Yes | |
| Peak active dependents | 8.5 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 0.9875 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 15 months ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2025-08-04 | GitHub repository | Yes | |
| Latest release | 2025-08-04 | crates.io database dump | Yes | |
| First release | 2024-03-24 | crates.io database dump | Yes | |
| Latest version | 0.2.1 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 0 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 0 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution11 releases, 36,149 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 11 | crates.io database dump | Yes | |
| Downloads over 30 days | 36149 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository64 stars, 19 forks, 6 contributors, 28 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 64 | GitHub repository | Yes โ one part of the repository route | |
| GitHub forks | 19 | GitHub repository | Yes โ one part of the repository route | |
| Contributors with a GitHub account | 6 | GitHub contributors | Yes โ one part of the repository route | |
| Commits on the default branch | 28 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | MIT | GitHub repository | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | Binds native code: ort-sys | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 11 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.