Instructions to use anira-project/silero-vad with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use anira-project/silero-vad with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Silero VAD for anira
Silero VAD v6.2.3, a voice activity detector, for real-time inference with anira on ONNX Runtime, LiteRT, ExecuTorch (XNNPACK and Core ML) and LibTorch: 512 samples at 16 kHz in, the speech probability of the block out, its state as an explicit tensor.
Files
| File | Engine | Size | SHA256 |
|---|---|---|---|
onnx/silero_vad_16k.onnx |
ONNX Runtime | 1,250,207 | 165af836d0a0442bfe5d5d91c3e715a995d55ac21ecc1179a96301fe140e7e2c |
litert/silero_vad_16k.tflite |
LiteRT, TensorFlow Lite | 1,254,896 | dfb2e98438dede7718e33cb3a63863b333b82e486ba122ebb803551094d488e9 |
executorch/silero_vad_16k.pte |
ExecuTorch 1.3.1 (XNNPACK) | 1,256,452 | ea5aac11e1c8ba1e56675314fb74e593257cfd90646228a190b2a31ff05633c7 |
executorch/silero_vad_16k_coreml.pte |
ExecuTorch 1.3.1 (Core ML, Apple) | 1,323,745 | a5f5df5e577c29b153a7a6e72c738ae49a95c6fc3d49d0305c4fa9ef897bbe99 |
executorch/silero_vad_16k_vulkan.pte |
ExecuTorch 1.3.1 (Vulkan, GPUs) | 1,255,684 | 5fca4378fb2b957b11df7755f82e1a1851d791405dd2fb19ebd47230e84d3b44 |
libtorch/silero_vad_16k.pt |
LibTorch | 1,249,106 | 5bfd137a62181f889343995da9bdde47bde3306e795a50553bf3a0b0a961adc2 |
upstream/silero_vad.onnx |
upstream original | 2,327,524 | 1a153a22f4509e292a94e67d6f9b85e8deb25b4988682b7e174c65279d8788e3 |
| Inputs | Outputs |
|---|---|
audio_in [1,1,512], state_in [1,320] |
probability [1,1,1], state_out [1,320] |
The state is the LSTM's h and c (128 each) and the last 64 samples of the previous call, which upstream's wrapper keeps outside the model and prepends to each block; start a stream with zeros. The LiteRT, ExecuTorch and LibTorch tensors are unnamed; their order is the ONNX model's.
Export
The scripts in export/ rebuild the 16 kHz model in eager PyTorch from the weights of
upstream's TorchScript model (silero_vad.jit, same release) and export it. export.py checks the
rebuild against upstream's TorchScript and ONNX models on a synthetic voiced signal (probabilities
0.001 to 0.96; largest deviation 7e-7) and writes ONNX and TorchScript; export_litert.py and
export_executorch.py write LiteRT and ExecuTorch and check them against the ONNX export (1.3e-6);
export_executorch.py --coreml lowers it to Core ML (silero_vad_16k_coreml.pte, Apple platforms,
float32 on the CPU and GPU; 1.6e-6).
cd export
uv run --no-project export.py <silero_vad.jit> <silero_vad.onnx> <prefix>
uv run --no-project export_litert.py <silero_vad.jit> <prefix>
uv run --no-project export_executorch.py <silero_vad.jit> <prefix> [--coreml]
upstream/silero_vad.onnx is upstream's ONNX model, unchanged (its sr input selects 8 or 16 kHz;
the caller passes the 64 samples of context).
Formats and checks
Every model here runs on ONNX Runtime, LiteRT and TensorFlow Lite, LibTorch, ExecuTorch (XNNPACK on the CPU, Core ML on Apple, Vulkan on GPUs) and as a native Core ML ML program, with the ONNX models' tensor names. anira foundation models streams every format of every description over twelve consecutive calls with the state fed back and checks that they agree (tools/check_streaming.py). The deviations are of the speech probability on the voiced test signal.
| Format | Files | Max deviation from ONNX Runtime |
|---|---|---|
| ExecuTorch, Core ML (Apple, float32) | executorch/silero_vad_16k_coreml.pte |
1.6e-6 |
| ExecuTorch, Vulkan (GPUs) | executorch/silero_vad_16k_vulkan.pte |
exported; not run here (no Vulkan runtime) |
| Core ML ML program (anira's native engine, coming with v3; macOS 13, iOS 16) | coreml/silero_vad_16k.mlpackage |
1.6e-6 |
cd export
uv run --no-project export_executorch.py <silero_vad.jit> <prefix> [--coreml | --vulkan]
uv run --no-project export_coreml.py <silero_vad.jit> <prefix>
This repository holds the weights, the export scripts and the licence. The anira model description
lives with the code in anira foundation models (models/speech-to-text), versioned with git. Pin a
revision and check each file's SHA256 when you download:
https://huggingface.co/anira-project/silero-vad/resolve/<revision>/onnx/silero_vad_16k.onnx
Licence
MIT, ยฉ Silero Team: LICENSE, copied from
snakers4/silero-vad @ v6.2.3, where the models are
src/silero_vad/data/silero_vad.jit and silero_vad.onnx. The exports and the export scripts are
MIT too.
- Downloads last month
- -