Silero VAD: pre-trained enterprise-grade Voice Activity Detector

Silero VAD
Silero VAD - pre-trained enterprise-grade Voice Activity Detector (also see our STT models).
Real Time Example
https://user-images.githubusercontent.com/36505480/144874384-95f80f6d-a4f1-42cc-9be7-004c891dd481.mp4
Please note, that video loads only if you are logged in your GitHub account.
Fast start
Dependencies
System requirements to run python examples on x86-64 systems: - python 3.8+; - 1G+ RAM; - A modern CPU with AVX, AVX2, AVX-512 or AMX instruction sets.
Dependencies: - torch>=1.12.0; - torchaudio>=0.12.0 (for I/O only); - onnxruntime>=1.16.1 (for ONNX model usage). Silero VAD uses torchaudio library for audio I/O (torchaudio.info, torchaudio.load, and torchaudio.save), so a proper audio backend is required: - Option โ1 - FFmpeg backend. conda install -c conda-forge 'ffmpeg<7'; - Option โ2 - soxio backend. apt-get install sox, TorchAudio is tested on libsox 14.4.2; - Option โ3 - soundfile backend. pip install soundfile.
If you are planning to run the VAD using solely the onnx-runtime, it will run on any other system architectures where onnx-runtume is supported. In this case please note that:
- You will have to implement the I/O;
- You will have to adapt the existing wrappers / examples / post-processing for your use-case.
Using pip: pip install silero-vad
from silerovad import loadsilerovad, readaudio, getspeechtimestamps
model = loadsilerovad()
wav = readaudio('pathtoaudiofile')
speechtimestamps = getspeech_timestamps(
wav,
model,
return_seconds=True, # Return speech timestamps in seconds (default is samples)
)
Using torch.hub:
import torch torch.setnumthreads(1)
model, utils = torch.hub.load(repoordir='snakers4/silero-vad', model='silero_vad') (getspeechtimestamps, , readaudio, , ) = utils
wav = readaudio('pathtoaudiofile') speechtimestamps = getspeech_timestamps( wav, model, return_seconds=True, # Return speech timestamps in seconds (default is samples) )
Key Features
- Stellar accuracy
- Fast
- Lightweight
- General
- Flexible sampling rate
- Highly Portable
- No Strings Attached
Typical Use Cases
- Voice activity detection for IOT / edge / mobile use cases
- Data cleaning and preparation, voice detection in general
- Telephony and call-center automation, voice bots
- Voice interfaces
Links
- Examples and Dependencies
- Quality Metrics
- Performance Metrics
- Versions and Available Models
- Further reading
- FAQ
Get In Touch
Try our models, create an issue, start a discussion, join our telegram chat, email us, read our news.
Please see our wiki for relevant information and email us directly.
Citations
@misc{Silero VAD,
author = {Silero Team},
title = {Silero VAD: pre-trained enterprise-grade Voice Activity Detector (VAD), Number Detector and Language Classifier},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/snakers4/silero-vad}},
commit = {insertsomecommit_here},
email = {hello@silero.ai}
}
Examples and VAD-based Community Apps
- Example of VAD ONNX Runtime model usage in C++
- Example of VAD ExecuTorch model usage in C++
- Voice activity detection for the browser using ONNX Runtime Web
- OpenVINO conversion guidelines