fsmn vad

Providerfunasr
Categoryvoice-activity-detection
Licenseapache-2.0
Downloads3.5K
Stars0

Overview

FSMN-VAD is a lightweight, high-performance Voice Activity Detection model designed to efficiently separate speech from silence and background noise. Unlike traditional energy-based VADs, this model utilizes the FSMN (Finite State Machine Network) architecture to better handle complex acoustic environments and reduce false triggers. For developers building speech-to-text pipelines, it serves as an ideal front-end filter to strip non-speech segments before sending audio to heavier ASR engines, significantly reducing latency and computational costs. It is open-sourced under Apache-2.0, making it easy to integrate into commercial production environments via the FunASR framework.

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
# Install Hugging Face transformers
pip install transformers torch
SDK Usage
# 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:

Guidance
pip install -U huggingface_hub

CLI Download

Download the full repository

Download the full repository
huggingface-cli download funasr/fsmn-vad

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 funasr/fsmn-vad 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('funasr/fsmn-vad')

Git Download

Make sure git-lfs is installed first

Git Download
git lfs install
git clone https://huggingface.co/funasr/fsmn-vad

To skip LFS large-file downloads, use:

Skip LFS
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

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('funasr/fsmn-vad')
tokenizer = AutoTokenizer.from_pretrained('funasr/fsmn-vad')

Full Documentation

来源: HuggingFace

---
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

python
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

python
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

Join our Telegram