基于 LLM 的开源 ASR 模型系列,适用于中文、方言、口音和多语言语音,包含 FunASR、vLLM、流式处理和 LLaMA.cpp 运行时。
基于 LLM 的开源 ASR 模型系列,适用于中文、方言、口音和多语言语音,包含 FunASR、vLLM、流式处理和 LLaMA.cpp 运行时。
Fun-ASR is a family of end-to-end speech recognition models from Tongyi Lab. Checkpoint capabilities are distinct: Fun-ASR-Nano-2512 is trained on tens of millions of hours of speech and supports Chinese, English, Japanese, and Chinese dialects and accents; Fun-ASR-MLT-Nano-2512 is an 800M multilingual checkpoint trained on hundreds of thousands of hours and supports 31 languages. Both checkpoints integrate with FunASR for inference and serving.
| Model Name | Task Details | Training Data | Parameters |
|---|---|---|---|
| Fun-ASR-Nano (⭐ HF / Transformers · HF / FunASR) |
Speech recognition supports Chinese, English, and Japanese. Chinese includes support for 7 dialects (Wu, Cantonese, Min, Hakka, Gan, Xiang, Jin) and 26 regional accents (Henan, Shanxi, Hubei, Sichuan, Chongqing, Yunnan, Guizhou, Guangdong, Guangxi and more than 20 other regions). English and Japanese cover multiple regional accents. Additional features include lyric recognition and rap speech recognition. | Tens of millions of hours | 800M |
| Fun-ASR-MLT-Nano (⭐ ) |
Speech recognition supports Chinese, English, Cantonese, Japanese, Korean, Vietnamese, Indonesian, Thai, Malay, Filipino, Arabic, Hindi, Bulgarian, Croatian, Czech, Danish, Dutch, Estonian, Finnish, Greek, Hungarian, Irish, Latvian, Lithuanian, Maltese, Polish, Portuguese, Romanian, Slovak, Slovenian, and Swedish: 31 languages in total. | Hundreds of thousands of hours | 800M |
python -m pip install -U "funasr==1.4.15". Release ->Transcribe with the released Transformers 5.17.0 package. No toolkit installation or remote Python code is needed. Base Nano supports Chinese, English and Japanese; the 31-language MLT checkpoint is separate.
python -m pip install 'transformers==5.17.0' 'torch==2.10.0' 'torchaudio==2.10.0' 'librosa==0.11.0' 'soundfile==0.13.1'
Full Python recipe · Local audio, batches and keywords · Notebook · Space
…
Fun-ASR focuses on high-precision speech recognition, checkpoint-specific multilingual support, and industry customization capabilities.
git clone https://github.com/QwenAudio/Fun-ASR.git
cd Fun-ASR
pip install -r requirements.txt
The current ModelScope
FunAudioLLM/Fun-ASR-Nano-2512checkpoint includes all 86 trainedctc_decoder.*/ctc.*tensors (model.ptSHA-25681fec8616083c69377f3ceef36aba3655660ee0ca69a5d4a1e9810cd340ca499) and produces native CTC timestamps. The Hugging Face checkpoint at revision272c57b82523ada6fd87095e955f8e29100979abis still the older text-only artifact (model.ptSHA-25655ae0d2fee369f0f11cce0795f6927934ad17cf11b278a7e56a51272074160bb) with no CTC tensors. When this repository's currentmodel.pyis used withfunasr>=1.3.26, incomplete checkpoints fail closed: transcription remains available, buttimestampsare omitted instead of returning random 60 ms alignments. Usehub="ms"for checkpoint-native timestamps until the Hugging Face artifact and remote code are synchronized. See issue #70 and FunASR #3496.
Fun-ASR-Nano and Fun-ASR-MLT-Nano do not emit speaker labels by themselves. Compose them in FunASR with the separate
fsmn-vadandcam++models, as shown below. For one-pass anonymous diarization with transcription and timestamps, use the third-party OpenMOSS MOSS-Transcribe-Diarize deployment guide. It is a separate model rather than a Fun-ASR-Nano checkpoint feature.
Run Fun-ASR-Nano as a single self-contained binary — like whisper.cpp but for FunASR, with strong Chinese accuracy. Built-in FSMN-VAD, no Python at runtime.
bash runtime/llama.cpp/download-funasr-model.sh nano ./gguf
llama-funasr-cli --enc ./gguf/funasr-encoder-f16.gguf -m ./gguf/qwen3-0.6b-q8_0.gguf -a audio.wav --vad ./gguf/fsmn-vad.gguf
fsmn-vad.gguf is hosted in the shared FunAudioLLM/fsmn-vad-GGUF repo, not inside the Nano GGUF repo. The nano downloader above fetches it automatically; to fetch only VAD from the Hugging Face UI/CLI, use:
hf download FunAudioLLM/fsmn-vad-GGUF --include "*.gguf" --local-dir ./gguf
Prebuilt binaries: Releases · Download & quickstart: funasr.com/llama-cpp · GGUF: Nano encoder/LLM · FSMN-VAD · Docs & benchmarks: runtime/llama.cpp/
…
When transcribing long audio or many files on the funasr (PyTorch) path, pass
batch_size_s to batch the VAD segments through the LLM decoder together. This
greatly improves GPU utilization:
res = model.generate(
input=[wav_path],
cache={},
language="中文",
itn=True,
batch_size_s=120, # batch VAD segments up to ~120s of audio per LLM call
)
On Fun-ASR-Nano-2512 (184 Chinese files / 11,539 s, single H100) this is about 1.6x faster than the default per-segment decoding (RTFx 19.8 -> 31.8) with no loss in accuracy. For the highest throughput, use the vLLM path below.
This example is a composed FunASR pipeline: FSMN-VAD segments the audio,
Fun-ASR-Nano transcribes it, CAM++ assigns speaker labels, and CT-Punc restores
punctuation. The start and end values are VAD segment boundaries, not
reliable checkpoint-native character timestamps.
…
from model import FunASRNano
def main():
model_dir = "FunAudioLLM/Fun-ASR-Nano-2512"
m, kwargs = FunASRNano.from_pretrained(model=model_dir, device="cuda:0")
m.eval()
wav_path = f"{kwargs['model_path']}/example/zh.mp3"
res = m.inference(data_in=[wav_path], **kwargs)
text = res[0][0]["text"]
print(text)
if __name__ == "__main__":
main()
Parameter Description (click to expand) model_dir: Model name or local disk model path.trust_remote_code: Whether to trust remote code for loading custom model implementations.remote_code: Specify the location of specific model code (e.g., model.py in the current directory), supporting both absolute and relative paths.device: Specify the device to use, such as "cuda:0" or "cpu".Fun-ASR natively integrates the vLLM engine for high-throughput batch inference and production-grade real-time streaming service.
Full guide: docs/vllm_guide.md | API docs: modelscope.github.io/FunASR/vllm.html
| Mode | Use Case | Entry |
|---|---|---|
| Offline Batch | Large-scale transcription | AutoModelVLLM |
| Streaming SDK | Real-time subtitles | FunASRNanoStreamingVLLM |
| WebSocket Service | Production deployment | serve_realtime_ws.py |
from funasr.auto.auto_model_vllm import AutoModelVLLM
model = AutoModelVLLM(
model="FunAudioLLM/Fun-ASR-Nano-2512",
tensor_parallel_size=2, # Multi-GPU
gpu_memory_utilization=0.8,
)
results = model.generate(
["audio1.wav", "audio2.wav", "audio3.wav"],
language="中文",
hotwords=["张三", "北京"],
)
for r in results:
print(f"[{r['key']}] {r['text']}")
Long audio:
AutoModelVLLMdecodes each input in a single pass, so a long recording (e.g. a multi-minute meeting) can be truncated — pre-segment it with VAD and pass the segments, or use the high-levelAutoModel(model=..., vad_model="fsmn-vad"), which segments long audio automatically.
# Start server (with dynamic VAD + speaker diari
暂无开放 Issues,或尚未同步最近议题。