Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP servin
Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP servin
Industrial speech recognition toolkit for offline, streaming, and edge deployment.
ASR · VAD · punctuation · speaker pipelines · emotion and audio-event models · OpenAI-compatible serving
Quick Start · Model selection · Models · Deployment matrix · Deployment hub · Docs · Benchmark · Contribute
No local setup? Open the Colab quickstart to transcribe a public sample or upload your own audio in a browser.
Found FunASR useful? Star the project so more builders can find it.
# CPU-only installs can use the default PyPI wheels.
pip install torch torchaudio
pip install funasrFor GPU quickstarts, install the PyTorch and torchaudio wheels that match your NVIDIA driver from pytorch.org before installing FunASR. After installation, confirm the GPU is visible:
python - <<'PY'
import torch
print(torch.cuda.is_available())
PYOnly use device="cuda" when this prints True; otherwise use device="cpu"
or reinstall PyTorch with the correct CUDA wheel.
Flagship model — Fun-ASR-Nano (LLM-ASR for Chinese, English, and Japanese, plus Chinese dialect groups and regional accents; needs a GPU):
from funasr import AutoModel
model = AutoModel(model="FunAudioLLM/Fun-ASR-Nano-2512", device="cuda")
result = model.generate(input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav")
print(result[0]["text"])For the separate 31-language checkpoint, use Fun-ASR-MLT-Nano-2512. Language coverage is checkpoint-specific, so Nano and MLT-Nano should be treated as distinct model choices.
For a CPU-first example with five-language ASR plus emotion and audio-event tags, use SenseVoiceSmall. The pipeline below combines it with FSMN-VAD and CAM++ for speaker-aware VAD segments; these are not native speaker outputs of the SenseVoiceSmall checkpoint. See the SenseVoice paper, Hugging Face checkpoint, and GGUF edge checkpoint.
…This prints each returned segment's start time in seconds, anonymous speaker index, and text with SenseVoice tags removed. Text and segment boundaries depend on the audio and checkpoint; no fixed transcript is asserted here.
CAM++ extracts spk_embedding vectors. AutoModel clusters those embeddings
and assigns speaker indices to VAD segments. Indices are local to a recording,
not known-person identities. See the SDK contract for
the component and result boundaries. Change to device="cuda" only after
verifying a compatible GPU environment as described above.
At scale, accelerate Fun-ASR-Nano with vLLM (batch processing):
from funasr.auto.auto_model_vllm import AutoModelVLLM
model = AutoModelVLLM(model="FunAudioLLM/Fun-ASR-Nano-2512", tensor_parallel_size=1)
results = model.generate(["audio1.wav", "audio2.wav"], language="auto")Deploy as API server: Local SenseVoice CPU recipe · Nano GPU serving and pinned vLLM setup
Use with AI agents: MCP Server for Claude/Cursor · OpenAI API for LangChain/Dify/AutoGen
Use with voice agents: OpenClaw realtime plugin for self-hosted Talk and Voice Call transcription
FunASR is a toolkit: choose the task, checkpoint, and runtime separately. Support in one model or adapter does not imply support in every serving backend.
| Task | Checkpoint or pipeline | Runtime entrypoint | Important limitation |
|---|---|---|---|
| File transcription with emotion/event tags | SenseVoiceSmall | Python AutoModel, CPU or GPU |
Five-language checkpoint; tags do not identify speakers. |
| LLM-based file transcription | Fun-ASR-Nano | AutoModel; split-engine AutoModelVLLM for the documented GPU path |
Base Nano covers zh/en/ja and Chinese dialects/accents; timestamp support depends on checkpoint and path. |
| Broader multilingual transcription | Fun-ASR-MLT-Nano | Python AutoModel |
Separate 31-language checkpoint; do not transfer its coverage to base Nano. |
| Chunked live transcription | Paraformer-zh-streaming | Streaming SDK or runtime WebSocket service | Use the streaming checkpoint and per-session cache, not an offline checkpoint. |
| Speaker-aware file transcription | SenseVoiceSmall + FSMN-VAD + CAM++ | AutoModel with VAD and embedding clustering |
Anonymous indices within a recording, not enrolled-speaker identification. |
| Joint text, timestamps, and speakers | MOSS-Transcribe-Diarize, third-party OpenMOSS | FunASR adapter or upstream backend in the MOSS guide | Offline, recording-local anonymous labels; no external VAD/speaker pipeline for its unified path. |
| Native CPU/edge transcription | Fun-ASR-Nano or SenseVoiceSmall GGUF | llama.cpp runtime | Requires matching converted weights; GGUF is not a Python AutoModel checkpoint. |
See the Model Zoo and deployment matrix for checkpoint, interface, and licensing boundaries. Benchmark on your own audio and hardware before choosing a runtime.
Trying FunASR for the first time? Use the Colab quickstart before setting up a local environment. Choosing a first model? Start with the model selection guide. Planning a switch from Whisper or a cloud ASR provider? Use the migration guide and benchmark example to test representative audio, map features, and roll out safely.
pip install funasrgit clone https://github.com/modelscope/FunASR.git && cd FunASR
pip install -e ./Requirements: Python ≥ 3.8. Install PyTorch + torchaudio first (pytorch.org), then pip install funasr.
This list includes third-party models. OpenMOSS publishes MOSS-Transcribe-Diarize; FunASR provides an adapter, not ownership of its weights. Its unified path is offline, with anonymous labels scoped to each recording, not realtime or known-person identification. Model licenses are separate from the toolkit's MIT license.
| Model | Task | Languages | Params | Links |
|---|---|---|---|---|
| Fun-ASR-Nano | ASR | zh/en/ja + Chinese dialects and accents | 800M | ⭐ 🤗 GGUF |
| Fun-ASR-MLT-Nano | ASR | 31 languages | 800M | ⭐ 🤗 |
| SenseVoiceSmall | ASR + emotion + events | zh/en/ja/ko/yue | 234M | ⭐ 🤗 GGUF paper |
| MOSS-Transcribe-Diarize | Third-party OpenMOSS: offline ASR + timestamps + anonymous speakers | See official card | See official card | 🤗 guide |
| Paraformer-zh | ASR + timestamps | zh/en | 220M | ⭐ 🤗 |
| Paraformer-zh-streaming | Streaming ASR | zh/en | 220M | ⭐ 🤗 |
| Qwen3-ASR | ASR, 52 languages | multilingual | 1.7B | usage |
| GLM-ASR-Nano | ASR, 17 languages | multilingual | 1.5B | usage |
| Whisper-large-v3 | ASR + translation | multilingual | 1550M | usage |
| Whisper-large-v3-turbo | ASR + translation | multilingual | 809M | usage |
| ct-punc | Punctuation | zh/en | 290M | ⭐ 🤗 |
| fsmn-vad | VAD | zh/en | 0.4M | ⭐ 🤗 |
| cam++ | Speaker embeddings (pipeline component) | — | 7.2M | ⭐ 🤗 |
| emotion2vec+large | Emotion recognition | — | 300M | ⭐ 🤗 |
Python tutorial · SDK parameters and outputs · Training · Model registration
…# Transcribe audio (simplest)
funasr audio.wav
# JSON output (for AI agents)
funasr audio.wav --output-format json
# SRT subtitles
funasr audio.wav --output-format srt --output-dir ./subs
# Speaker diarization + timestamps
funasr audio.wav --spk --timestamps -f json
# Choose model and language
funasr audio.wav --model paraformer --language zh
# Batch transcribe
funasr *.wav --output-format srt --output-dir ./outputAvailable models: sensevoice (default), paraformer, paraformer-en, fun-asr-nano
Start a local SenseVoice CPU service from a fresh directory in a POSIX shell with Python 3.11. This installs the PyPI release into a separate environment, not this source checkout. Keep the unauthenticated service on loopback; use the security guide before exposing it to other clients.
python3.11 -m venv .venv-funasr-http
. .venv-funasr-http/bin/activate
python -m pip install torch torchaudio
python -m pip install funasr fastapi uvicorn python-multipart
python -m pip check
funasr-server --host 127.0.0.1 --port 8000 --model sensevoice --device cpuWait for model download and server startup. In a second terminal, use the same directory and curl 7.76+ to download a public Chinese audio sample and transcribe it. The request uses the preloaded model; no fixed transcript or speaker labels are promised.
curl --fail --location https://isv-data.oss-cn-hangzhou.aliyuncs.com/icFun-ASR-Nano模型打开merge_vad参数后标点符号的时间戳不对
Bug: model.generate(input=bytes) hangs for minutes on raw PCM chunks that trigger audio container false-positive
[Showcase] CallRec — 手机通话录音的 100% 离线档案库(SenseVoice + CAM++ 声纹 + Ollama 摘要 + 关系图谱)
关于实时模式的vllm解码并发问题
【暴露的问题比断句严重】实时语音,切分不够彻底,怎么解决
[安装] 昇腾 NPU 环境下 pip install funasr 可能替换 torch 导致 torch_npu 失效,建议提供对 NPU 友好的安装方式
License clarification for SenseVoice-Small weights at a fixed revision (ONNX redistribution)
Fine-tuning Fun-ASR-Nano on a B200: one step in six takes 1 s because cuDNN SDPA builds a plan for every new batch shape
[Bug / Performance] spk_model spectral clustering saturates every CPU core by default
[Feature Request] Allow VAD to run on a different device than the ASR model (Apple Silicon MPS regression: VAD 5x slower than CPU)