silero

Library Listed

Production-oriented Rust wrapper for the Silero VAD ONNX model.

Checked · Sources

Downloads
1,888
Dependents
3
Stars
6
Forks
1
Contributors
3
Commits
15
Latest release
0.7.0 ·

About

From the project README ·

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
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 the bundled feature is enabled
  • Session::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.
  • SpeechDetector is kept as a type alias for SpeechSegmenter.

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.

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.

silero beside the projects that share a topic with it
ProjectDownloadsDependentsStarsLatest releaseRuns on (GPU)Native codeLicense
silero This page 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
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
qwen3_tts_rs App Listed

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

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

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
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 days
  • dormancy: last activity 2026-09-12, 58 days ago, E = 365: active
  • featured: 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
Adoption3 active dependents, 3 new dependents in 365 days1 not measured
Adoption measurements
SignalValueSourceFetchedCounts
Active dependents3crates.io database dumpYes
New dependents (365 days)3crates.io database dumpYes
Peak active dependents3crates.io database dumpYes
Active dependents as a share of the peak1crates.io database dumpYes
Binary downloads per releaseNot measuredYes
MaintenanceLatest human commit: 58 days ago3 not measured
Maintenance measurements
SignalValueSourceFetchedCounts
Latest human commit2026-09-12GitHub repositoryYes
Latest release2026-08-22crates.io database dumpYes
First release2026-04-08crates.io database dumpYes
Latest version0.7.0crates.io database dumpYes
Days the oldest outside issue waits for a reply184GitHub repositoryYes
Maintainer replies over 365 days0GitHub repositoryYes
Repository archivedfalseGitHub repositoryYes
Repository gonefalseGitHub repositoryYes
Release commit or manifest in the repotruecrates.io packageYes
Published docstruecrates.io database dumpYes
Latest release fails cargo checkNot measuredYes
Build check dateNot measuredYes
Build check toolchainNot measuredYes
SecurityUnpatched vulnerabilities: none
Security measurements
SignalValueSourceFetchedCounts
Unpatched vulnerabilities past the grace windownoneRustSec advisory databaseYes
RustSec unmaintained advisorynoneRustSec advisory databaseYes
Deprecation noticenonecrates.io database dumpYes
Deprecated requirementnonecrates.io database dumpYes
Distribution8 releases, 1,888 downloads over 30 days5 not measured
Distribution measurements
SignalValueSourceFetchedCounts
Releases8crates.io database dumpYes
Downloads over 30 days1888crates.io database dumpYes
Binary downloads over the last 3 releasesNot measuredYes
Homebrew installs on request over 365 daysNot measuredYes
Repology repository familiesNot measuredYes
Docker pull growth over 90 daysNot measuredYes
Docker pulls at the growth baselineNot measuredYes
Every version a prereleasefalsecrates.io database dumpYes
Every version 0.0.xfalsecrates.io database dumpYes
Every version yankedfalsecrates.io database dumpYes
Crate deleted from crates.iofalsecrates.io database dumpYes
Repository6 stars, 1 forks, 3 contributors, 15 commits. Stars alone never qualify a project.
Repository measurements
SignalValueSourceFetchedCounts
GitHub stars6GitHub repositoryYes — one part of the repository route
GitHub forks1GitHub repositoryYes — one part of the repository route
Contributors with a GitHub account3GitHub contributorsYes — one part of the repository route
Commits on the default branch15GitHub repositoryNo
Repository's main crate left out of the entrynonecrates.io database dumpYes
Facts that never count
Facts that never count measurements
SignalValueSourceFetchedCounts
LicenseApache-2.0 OR MITcrates.io database dumpNo
Runs on, from listed crates and their direct dependenciesCUDA, ROCmcrates.io database dumpNo
What shows each backendCUDA: silero feature cuda; ROCm: silero feature rocmcrates.io database dumpNo
Native code, from listed crates and their dependenciesBinds native code: ort-sys (feature coreml)crates.io database dumpNo
Python bindings, from direct dependencies of listed cratesNo Python binding crate foundcrates.io database dumpNo
Crates that depend on a listed crate directly3crates.io database dumpNo

Corrections and review history

Report a correction

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.