Skip to content
WebAI

Cutting speech ranges out of audio with Silero VAD

Voice activity detection answers a single question: which parts of the audio contain speech. Why nearly every speech pipeline starts with it, where the Silero ONNX input contract is easy to get wrong, and what the three sliders on the demo page control.

Voice activity detection does one thing: given an audio clip, mark the ranges where someone is speaking. It says nothing about content or speaker. What comes out is a per-frame speech probability, and a threshold with hysteresis turns that track into segments. Live captions use it to decide when to wake the ASR, meeting transcribers use it to skip silence, and voice assistants use it to tell whether you have finished. Almost every speech pipeline starts here.

Letting the ASR do it is expensive

Models like Whisper weigh tens to hundreds of MB and decode token by token. Silero VAD’s fp32 ONNX build measures 2.3 MB, scores one 32 ms frame at a time and runs single-threaded on CPU with millisecond latency. Cut silence and music out first and only the real speech goes to the ASR, which saves decoding time, memory and tokens together.

The other reason is more practical: an ASR can produce perfectly confident text over pure noise or a music bed. A VAD in front blocks most of those phantom words at the source.

Three things it does not handle

  • No content. The output is time ranges, not text
  • No speakers. That belongs to diarization, and the pyannote stack takes several more steps after VAD
  • No cleanup. It marks ranges and never touches the waveform; that is the denoising page

The two entries in the catalogue

The audio/vad task lists two. Silero VAD is our default, a lightweight network built for streaming with 2.3 MB of fp32 ONNX weights, 16 kHz and 32 ms frames, LSTM state carried across frames, and an MIT licence; in a browser it runs in real time through @ricky0123/vad-web or plain onnxruntime-web. pyannote-segmentation-3.0 emits one more thing: besides speech, it scores overlapping speech, which is the first stage of a diarization pipeline. Its q8 build measures about 1.5 MB.

AspectSilero VADpyannote-segmentation-3.0
Design goalReal-time streaming VADFirst stage of diarization
OutputPer-frame speech probabilityNon-speech / speech / overlap
Frame length32 ms (16 kHz)~1/16 s
fp32 weights2.3 MB ONNX~5.9 MB ONNX
Smallest quantised build— (official builds are fp32)q8, ~1.5 MB
LicenceMIT (weights) / ISC (vad-web)MIT (weights)
Measured weight download sizes for both models

The trap we hit wiring up the weights

We started by feeding the Silero v5 ONNX graph 512 samples, the way most examples show it, and the probability sat at 0.001 no matter what we played. The v5 input needs 64 samples of history prepended, so the shape is [1, 576]; the LSTM state is [2,1,128], each frame has to feed the returned stateN into the next one, and sr is an int64 scalar. With that fixed, a real speech sample scored between 0.82 and 1.00 and silence sat near zero. Those details are scattered across the docs and easy to miss until you actually run the graph.

Pick a built-in sample or upload your own audio and the demo really downloads those 2.3 MB and runs frame by frame, highlighting speech ranges on the waveform and listing each segment’s mean confidence. The three sliders are the ones you end up tuning in production: a higher speech threshold is more conservative, minimum speech duration filters one-frame false triggers, and minimum silence duration keeps a breath from splitting one utterance. The speech-over-music sample is the hard case. An energy gate labels the whole music bed as speech, while a trained network holds the boundary. The pyannote-segmentation card needs a hand-rolled Kaldi fbank front-end in the browser, so the page clearly labels Silero as its stand-in.

Where it sits in a pipeline

  • Live captions and meeting notes: each cut range goes to the ASR, then a summariser folds the text together, the same shape as the VAD + Whisper + summarisation recipe in our applications section
  • Voice assistants use endpointing to tell when the user has finished, which feels better than a fixed timeout
  • Cloning and denoising keep only speech frames, so the model never learns the music bed
  • Archives index, navigate and bill by speech ranges instead of whole files

What comes after it

Both downstream stages have demos here: speech recognition turns the cut ranges into timestamped text, and speech denoising rebuilds a clean waveform from the same audio. Start at the VAD demo and hop across.

All posts →

← Back to all posts