Downloads · 30 days
28
12% of all-time downloads
huggingworld/silero-vad
silero-vad is a machine learning model from huggingworld. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for ml-agents. The card lists the license as mit.
<br/ <h1 align="center"Silero VAD</h1 <br/
Downloads · 30 days
28
12% of all-time downloads
All-time downloads
235
Public
Repo size
7.1 MB
Likes
2
Public
Click a slice to open those files.
.onnx2.2 MB · 100%
From the Hugging Face model README
Silero VAD - pre-trained enterprise-grade Voice Activity Detector (also see our STT models).
<br/> <p align="center"> <img src="https://github.com/user-attachments/assets/f2940867-0a51-4bdb-8c14-1129d3c44e64" /> </p> <br/> <h2 align="center">Fast start</h2> <br/> <details> <summary>Dependencies</summary>System requirements to run python examples on x86-64 systems:
python 3.8+;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:
conda install -c conda-forge 'ffmpeg<7';apt-get install sox, TorchAudio is tested on libsox 14.4.2;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:
Using pip:
pip install silero-vad
from silero_vad import load_silero_vad, read_audio, get_speech_timestamps
model = load_silero_vad()
wav = read_audio('path_to_audio_file')
speech_timestamps = get_speech_timestamps(
wav,
model,
return_seconds=True, # Return speech timestamps in seconds (default is samples)
)
Using torch.hub:
import torch
torch.set_num_threads(1)
model, utils = torch.hub.load(repo_or_dir='snakers4/silero-vad', model='silero_vad')
(get_speech_timestamps, _, read_audio, _, _) = utils
wav = read_audio('path_to_audio_file')
speech_timestamps = get_speech_timestamps(
wav,
model,
return_seconds=True, # Return speech timestamps in seconds (default is samples)
)
<br/>
<h2 align="center">Key Features</h2>
<br/>
Stellar accuracy
Silero VAD has excellent results on speech detection tasks.
Fast
One audio chunk (30+ ms) takes less than 1ms to be processed on a single CPU thread. Using batching or GPU can also improve performance considerably. Under certain conditions ONNX may even run up to 4-5x faster.
Lightweight
JIT model is around two megabytes in size.
General
Silero VAD was trained on huge corpora that include over 6000 languages and it performs well on audios from different domains with various background noise and quality levels.
Flexible sampling rate
Silero VAD supports 8000 Hz and 16000 Hz sampling rates.
Highly Portable
Silero VAD reaps benefits from the rich ecosystems built around PyTorch and ONNX running everywhere where these runtimes are available.
No Strings Attached
Published under permissive license (MIT) Silero VAD has zero strings attached - no telemetry, no keys, no registration, no built-in expiration, no keys or vendor lock.
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
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 = {insert_some_commit_here},
email = {[email protected]}
}
<br/>
<h2 align="center">Examples and VAD-based Community Apps</h2>
<br/>