silero
Library Listed
Production-oriented Rust wrapper for the Silero VAD ONNX model.
- Downloads
- 1,888
- Dependents
- 3
- Stars
- 6
- Forks
- 1
- Contributors
- 3
- Commits
- 15
- Latest release
- 0.7.0 ·
About
Production-oriented Rust wrapper for the Silero VAD ONNX model.
Introduction
Production-oriented Rust wrapper for the Silero VAD ONNX model.
This crate is designed around the way we actually run VAD in services:
- one reusable ONNX session per worker
- one small stream state per active audio stream
- one optional segmenter that turns frame probabilities into speech ranges
It intentionally does not own queueing, health checks, worker counts, or ONNX thread policy. Those belong in a higher-level service crate.
Model layout
Silero VAD is a stateful model:
- input audio: fixed-size 8 kHz or 16 kHz chunks
- rolling context: 32 samples at 8 kHz, 64 samples at 16 kHz
- recurrent memory:
state/stateN
Because of that, the crate exposes three core building blocks:
Session- owns the ONNX Runtime session
- supports exact-chunk single inference and multi-stream batch inference
StreamState- owns per-stream model memory: recurrent state, rolling context, and tail buffer
SpeechSegmenter- turns frame probabilities into
SpeechSegments using hysteresis and timing rules
- turns frame probabilities into
Read the full README
Quick start
use silero::{Session, SpeechOptions, detect_speech};
fn main() -> Result<(), silero::Error> {
let model = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/models/silero_vad.onnx"));
let audio_16k: Vec<f32> = vec![0.0; 16_000];
let mut session = Session::from_memory(model)?;
let segments = detect_speech(&mut session, &audio_16k, SpeechOptions::default())?;
println!("detected {} speech segments", segments.len());
Ok(())
}
Streaming usage
use silero::{Session, SpeechOptions, SpeechSegmenter, SpeechSegmenterExt, StreamState};
fn main() -> Result<(), silero::Error> {
let model = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/models/silero_vad.onnx"));
let mut session = Session::from_memory(model)?;
let config = SpeechOptions::default();
let mut stream = StreamState::new(config.sample_rate());
let mut segmenter = SpeechSegmenter::new(config.clone());
let audio_chunk = vec![0.0_f32; config.sample_rate().chunk_samples()];
let print = |segment: silero::SpeechSegment| {
println!(
"speech {:.2}s -> {:.2}s",
segment.start_seconds(),
segment.end_seconds()
);
};
if let Some(segment) = segmenter.push_samples(&mut session, &mut stream, &audio_chunk)? {
print(segment);
while let Some(more) = segmenter.push_samples(&mut session, &mut stream, &[])? {
print(more);
}
}
if let Some(segment) = segmenter.finish_stream(&mut session, &mut stream)? {
print(segment);
while let Some(more) = segmenter.push_samples(&mut session, &mut stream, &[])? {
print(more);
}
}
Ok(())
}
Batch inference
Silero's batch dimension represents independent streams at the same sample rate, not consecutive chunks from one stream.
use silero::{BatchInput, SampleRate, Session, StreamState};
let model = include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/models/silero_vad.onnx"));
let mut session = Session::from_memory(model).unwrap();
let mut a = StreamState::new(SampleRate::Rate16k);
let mut b = StreamState::new(SampleRate::Rate16k);
let chunk_a = vec![0.0_f32; 512];
let chunk_b = vec![0.0_f32; 512];
let mut batch = [
BatchInput::new(&mut a, &chunk_a),
BatchInput::new(&mut b, &chunk_b),
];
let probabilities = session.infer_batch(&mut batch).unwrap();
assert_eq!(probabilities.len(), 2);
Session construction
The crate bundles models/silero_vad.onnx and exposes:
Session::bundled()when thebundledfeature is enabledSession::from_file(...)Session::from_memory(...)Session::from_ort_session(...)
SessionOptions only contains model-local options such as graph optimization.
If a service needs to tune intra_threads / inter_threads, build the ORT
session at the service layer and pass it into Session::from_ort_session(...).
Notes
- Direct sample rates: 8 kHz and 16 kHz.
- The crate does not do audio decoding or resampling.
SpeechDetectoris kept as a type alias forSpeechSegmenter.
Development
cargo fmt
cargo test
License
silero is under the terms of both the MIT license and the
Apache License (Version 2.0).
See LICENSE-APACHE, LICENSE-MIT for details.
Copyright (c) 2026 FinDIT studio authors.
Third-party model notice
This crate bundles and redistributes models/silero_vad.onnx, a Silero VAD model
from the upstream Silero project.
The bundled model is third-party content and remains subject to its upstream license terms. The upstream Silero model is distributed under the MIT license, and redistribution should retain the upstream copyright and permission notice.
See THIRD_PARTY_NOTICES.md for the bundled model's upstream sources, attribution, and MIT notice text.
Compatibility
- Runs on
- CUDA, ROCm
What shows it
- CUDA: silero feature cuda
- ROCm: silero feature rocm
- Native code
- Optional
- Binds native code: ort-sys (feature coreml)
- Python bindings
- No Python binding crate found
- License
- Apache-2.0 OR 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 |
|---|---|---|---|---|---|---|---|
|
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 |
|
sherpa-onnx Featured
Safe Rust wrapper for sherpa-onnx speech recognition toolkit Also in Run and serve models. |
259,599 downloads over 30 days | 28 | 15,834 | 2.0.1 | GPU support unknown | Binds native code: sherpa-onnx, sherpa-onnx-sys | Apache-2.0 |
|
Voice Activity Detector using the Silero VAD model. Also in Speech and audio. |
36,149 downloads over 30 days | 11 | 64 | 0.2.1 | GPU support unknown | Binds native code: ort-sys | MIT |
|
A Rust implementation of the Qwen3 Text-to-Speech (TTS) model inference. Also in Run and serve models. |
204 binary downloads per release | Not applicable | 237 | Not measured | Not measured | None stated | |
|
kitten-tts-rs Listed
Rust port of KittenTTS — ultra-lightweight ONNX-based text-to-speech Also in Run and serve models. |
3 downloads over 30 days | 0 | 314 | 0.2.2 | CUDA | Binds native code: audiopus_sys, mp3lame-sys, ort-sys | Apache-2.0 |
|
cohere-transcribe-rs Listed
Rust implementation for the CohereLabs/cohere-transcribe-03-2026 speech-to-text model. Includes a CLI and an OpenAI-compatible API server. Also in Speech and audio. |
0 downloads over 30 days | 0 | 101 | 0.1.1 | CUDA | Binds native code: torch-sys (feature tch-backend). Build uses a native toolchain: cmake | Apache-2.0 |
|
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. Also in Speech and audio. |
642 downloads over 30 days | 2 | 2 | 0.9.1 | CUDA | No native code found | Apache-2.0 |
All projects in Run and serve modelsAll projects in Speech and audio
Why ListedNo archive, New or Featured rule places it, so it is Listed.
What it lacks for Featured
- It has 3 active dependents and 3 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 6 stars, 1 fork and 3 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
What else the check found
- The last activity is on 12 Sep 2026, 58 days ago. The rules expect an update within 365 days. Dormancy rule
Exact rules: Listed, Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.7.0 base 140, raised to the 365-day floor: E = 365 daysdormancy: last activity 2026-09-12, 58 days ago, E = 365: activefeatured: not featured: active_users 3 < 11 and new_adopters 3 < 9 and repository route stars 6 (needs 4539), forks 1 (needs 434), contributors 3 (needs 79)listed: 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
Adoption3 active dependents, 3 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 3 | crates.io database dump | Yes | |
| New dependents (365 days) | 3 | crates.io database dump | Yes | |
| Peak active dependents | 3 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 58 days ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-09-12 | GitHub repository | Yes | |
| Latest release | 2026-08-22 | crates.io database dump | Yes | |
| First release | 2026-04-08 | crates.io database dump | Yes | |
| Latest version | 0.7.0 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 184 | 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 |
Distribution8 releases, 1,888 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 8 | crates.io database dump | Yes | |
| Downloads over 30 days | 1888 | 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 |
Repository6 stars, 1 forks, 3 contributors, 15 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 6 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 1 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 3 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 15 | 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 | Apache-2.0 OR MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | CUDA, ROCm | crates.io database dump | No | |
| What shows each backend | CUDA: silero feature cuda; ROCm: silero feature rocm | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | Binds native code: ort-sys (feature coreml) | 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 | 3 | 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.