fsmn vad
Overview
Highlights
- Low-latency speech detection using FSMN architecture
- Reduces ASR compute costs by filtering silence
- Robust performance in noisy acoustic environments
- Permissive Apache-2.0 license for commercial use
- Seamless integration with the FunASR ecosystem
Usage
# Install Hugging Face transformers
pip install transformers torch
# Load model with transformers
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("funasr/fsmn-vad")
tokenizer = AutoTokenizer.from_pretrained("funasr/fsmn-vad")
Hugging Face Download
We recommend downloading the model via the Hugging Face CLI or Hub SDK.
Guidance:Before downloading, install huggingface_hub with:
pip install -U huggingface_hub
CLI Download
Download the full repository
huggingface-cli download funasr/fsmn-vad
Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download funasr/fsmn-vad config.json --local-dir ./dir
See the official docs for more CLI options
SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('funasr/fsmn-vad')
Git Download
Make sure git-lfs is installed first
git lfs install
git clone https://huggingface.co/funasr/fsmn-vad
To skip LFS large-file downloads, use:
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/funasr/fsmn-vad
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
pip install -U transformers torch
Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('funasr/fsmn-vad')
tokenizer = AutoTokenizer.from_pretrained('funasr/fsmn-vad')
Full Documentation
---
license: apache-2.0
language:
- zh
- en
pipeline_tag: voice-activity-detection
tags:
- VAD
- FunASR
- voice-activity-detection
- speech-segmentation
library_name: funasr
---
<div align="center">
⭐ Powered by FunASR — please give us a GitHub Star!
This model is part of the FunASR ecosystem — one industrial-grade open-source toolkit for ASR · VAD · punctuation · speaker diarization · emotion / event · LLM-ASR. A Star really helps the project (and keeps you updated):
🌟 FunASR · 🌟 SenseVoice · 🌟 Fun-ASR · 🌟 FunClip
</div>
FSMN-VAD
Voice Activity Detection — accurately detect speech segments in audio, essential for long-audio processing pipelines.
FSMN-VAD uses a Feedforward Sequential Memory Network to detect speech/non-speech boundaries with high precision and low latency. It supports both streaming and offline modes.
Quick Start
from funasr import AutoModel
Standalone VAD
model = AutoModel(model="funasr/fsmn-vad", hub="hf", device="cuda")
result = model.generate(input="long_audio.wav")
Returns speech segments: [[start_ms, end_ms], [start_ms, end_ms], ...]
print(result[0]["value"])Use as Part of ASR Pipeline
from funasr import AutoModel
VAD automatically segments long audio before ASR
model = AutoModel(
model="funasr/paraformer-zh",
hub="hf",
vad_model="funasr/fsmn-vad",
device="cuda",
)
result = model.generate(input="meeting_2hours.wav")
print(result[0]["text"])Features
- Streaming and offline voice activity detection
- Configurable segment length (
max_single_segment_time)
- Low latency for real-time applications
- Works with all FunASR ASR models as a preprocessing step
Model Details
| Property | Value |
|----------|-------|
| Architecture | FSMN (Feedforward Sequential Memory Network) |
| Sample Rate | 16kHz |
| Modes | Streaming + Offline |
Links
- GitHub: FunASR