Silero VAD v5 MLX

Provideraufklarer
Categoryvoice-activity-detection
Licensemit
Downloads47
Stars0

Overview

Silero VAD v5 MLX is a specialized voice activity detection model optimized for Apple Silicon via the MLX framework. Unlike general-purpose audio models, this implementation focuses on the critical task of distinguishing human speech from background noise with extremely low latency. For developers building real-time voice interfaces or transcription pipelines on macOS, this port eliminates the overhead of heavy dependencies by leveraging unified memory and GPU acceleration. It serves as an efficient front-end trigger for larger ASR models, significantly reducing compute costs by ensuring the heavier speech-to-text engine only processes active voice segments. Integration is straightforward for those already within the MLX ecosystem, providing a lightweight alternative to Torch-based deployments without sacrificing accuracy.

Highlights

  • Native MLX optimization for Apple Silicon hardware acceleration
  • Low-latency speech detection for real-time audio pipelines
  • Reduces ASR compute costs by filtering non-speech segments
  • Lightweight deployment with minimal memory overhead
  • Permissive MIT license for flexible commercial integration

Usage

Install
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# Load model with transformers
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("aufklarer/Silero-VAD-v5-MLX")
tokenizer = AutoTokenizer.from_pretrained("aufklarer/Silero-VAD-v5-MLX")

Hugging Face Download

We recommend downloading the model via the Hugging Face CLI or Hub SDK.

Guidance:Before downloading, install huggingface_hub with:

Guidance
pip install -U huggingface_hub

CLI Download

Download the full repository

Download the full repository
huggingface-cli download aufklarer/Silero-VAD-v5-MLX

Download a single file to a local folder (e.g. config.json into ./dir)

Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download aufklarer/Silero-VAD-v5-MLX config.json --local-dir ./dir

See the official docs for more CLI options

SDK Download

SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('aufklarer/Silero-VAD-v5-MLX')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://huggingface.co/aufklarer/Silero-VAD-v5-MLX

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/aufklarer/Silero-VAD-v5-MLX

Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.

PyTorch / Transformers Usage

Install Transformers

Install Transformers
pip install -U transformers torch

Load the model and run inference

Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('aufklarer/Silero-VAD-v5-MLX')
tokenizer = AutoTokenizer.from_pretrained('aufklarer/Silero-VAD-v5-MLX')

Model Download

We recommend downloading the model via the ModelScope CLI or SDK.

Guidance:Before downloading, install ModelScope with:

Guidance
pip install modelscope

CLI Download

Download the full repository

Download the full repository
modelscope download --model aufklarer/Silero-VAD-v5-MLX

Download a single file to a local folder (e.g. README.md into ./dir)

Download a single file to a local folder (e.g. README.md into ./dir)
modelscope download --model aufklarer/Silero-VAD-v5-MLX README.md --local_dir ./dir

See the docs for more CLI options

SDK Download

SDK Download
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('aufklarer/Silero-VAD-v5-MLX')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://www.modelscope.cn/aufklarer/Silero-VAD-v5-MLX.git

To skip LFS large-file downloads, use:

Skip LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/aufklarer/Silero-VAD-v5-MLX.git

ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。

Notebook Quickstart

Install the ModelScope library

Install the ModelScope library
pip install "modelscope[audio,cv,nlp,multi-modal,science]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html

Load the model and run inference

Load the model and run inference
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

p = pipeline('text-generation', 'aufklarer/Silero-VAD-v5-MLX')

Full Documentation

来源: HuggingFace

---
license: mit
tags:
- mlx
- voice-activity-detection
- silero
- vad
- streaming
- apple-silicon
base_model: snakers4/silero-vad
library_name: mlx
pipeline_tag: voice-activity-detection
---

Silero VAD v5 — MLX

MLX-compatible weights for Silero VAD v5, converted from the official JIT model.

Model

Silero VAD v5 is a lightweight (~309K params) voice activity detection model that processes 512-sample chunks (32ms @ 16kHz) with sub-millisecond latency. It outputs a speech probability between 0 and 1 for each chunk, with LSTM state carried across chunks for streaming operation.

Architecture: STFT → 4×Conv1d+ReLU encoder → LSTM(128) → Conv1d decoder → sigmoid

Usage (Swift / MLX)

swift
import SpeechVAD

// Load model
let vad = try await SileroVADModel.fromPretrained()

// Streaming: process 512-sample chunks
let prob = vad.processChunk(samples) // → 0.0...1.0

// Batch: detect speech segments in complete audio
let segments = vad.detectSpeech(audio: samples, sampleRate: 16000)
for seg in segments {
print("Speech: \(seg.startTime)s - \(seg.endTime)s")
}

Part of speech-swift.

Conversion

bash
python3 scripts/convert_silero_vad.py --upload

Converts the official Silero VAD v5 JIT model via torch.hub, transposes Conv1d weights for MLX channels-last format, sums LSTM biases (bias_ih + bias_hh), and saves as safetensors.

Weight Mapping

| JIT Key | MLX Key | Shape |
|---------|---------|-------|
| _model.stft.forward_basis_buffer | stft.weight | [258, 256, 1] |
| _model.encoder.{i}.reparam_conv.weight | encoder.{i}.weight | varies |
| _model.encoder.{i}.reparam_conv.bias | encoder.{i}.bias | varies |
| _model.decoder.rnn.weight_ih | lstm.Wx | [512, 128] |
| _model.decoder.rnn.weight_hh | lstm.Wh | [512, 128] |
| _model.decoder.rnn.bias_ih + bias_hh | lstm.bias | [512] |
| _model.decoder.decoder.2.weight | decoder.weight | [1, 1, 128] |
| _model.decoder.decoder.2.bias | decoder.bias | [1] |

License

The original Silero VAD model is released under the MIT License.

---

---

Join our Telegram