Skip to content
Back to search

funasr

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/modelscope/funasr with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/modelscope/funasr'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/modelscope--funasr/badge.svg)](/listings/modelscope--funasr)

HTML

<a href="/listings/modelscope--funasr"><img src="/api/listings/modelscope--funasr/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Native Transformers

For Fun-ASR-Nano transcription with the Hugging Face API, start with the [Transformers 5.17.0 CPU quickstart](./docs/transformers_native.md). No FunASR toolkit or remote Python code is needed.

[Space](https://huggingface.co/spaces/FunAudioLLM/Fun-ASR-Nano) · [Notebook](https://colab.research.google.com/github/QwenAudio/Fun-ASR/blob/main/examples/colab/fun_asr_nano_transformers.ipynb) · [Python / batch examples](https://github.com/QwenAudio/Fun-ASR/tree/main/examples/transformers)

FunASR toolkit and pipelines

No local setup? Open the [Colab quickstart](./examples/colab/) to transcribe a public sample or upload your own audio in a browser.

Found FunASR useful? [Star the project](https://github.com/modelscope/FunASR) so more builders can find it.

# CPU-only installs can use the default PyPI wheels.
pip install torch torchaudio
pip install funasr

For GPU quickstarts, install the PyTorch and torchaudio wheels that match your NVIDIA driver from [pytorch.org](https://pytorch.org/get-started/locally/) before installing FunASR. After installation, confirm the GPU is visible:

python - <<'PY'
import torch
print(torch.cuda.is_available())
PY

Only use `device="cuda"` when this prints `True`; otherwise use `device="cpu"` or reinstall PyTorch with the correct CUDA wheel.

**FunASR toolkit GPU example: Fun-ASR-Nano** (Chinese, English, Japanese, and Chinese dialect groups and regional accents; the separate native Transformers CPU path is linked above):

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](https://huggingface.co/FunAudioLLM/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](https://arxiv.org/abs/2407.04051), [Hugging Face checkpoint](https://huggingface.co/FunAudioLLM/SenseVoiceSmall), and [GGUF edge checkpoint](https://huggingface.co/FunAudioLLM/SenseVoiceSmall-GGUF).

from funasr import AutoModel
from funasr.utils.postprocess_utils import rich_transcription_postprocess

model = AutoModel(model="iic/SenseVoiceSmall", vad_model="fsmn-vad", spk_model="cam++", device="cpu")
result = model.generate(
    input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav",
    batch_size_s=300,
)

# The AutoModel pipeline returns VAD segments with speaker ids and timestamps:
for seg in result[0]["sentence_info"]:
    print(f"[{seg['start']/1000:.1f}s] Speaker {seg['spk']}: {rich_transcription_postprocess(seg['sentence'])}")

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](./docs/python_api.md) for the component and result boundaries. Change to `device="cuda"` only after verifying a compatible GPU environment as described above.

Scale & deploy the flagship

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)

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 422 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. ([简体中文](./README_zh.md)|English|[日本語](./README_ja.md)|[한국어](./README_ko.md))
  2. <p align="center">
  3. <a href="https://github.com/modelscope/FunASR"><img src="https://svg-banners.vercel.app/api?type=origin&text1=FunASR🤠&text2=💖%20A%20Fundamental%20End-to-End%20Speech%20Recognition%20Toolkit&width=800&height=210" alt="FunASR"></a>
  4. </p>
  5. <p align="center">
  6. <strong>Industrial speech recognition toolkit for offline, streaming, and edge deployment.</strong><br>
  7. <em>ASR · VAD · punctuation · speaker pipelines · emotion and audio-event models · OpenAI-compatible serving</em>
  8. </p>
  9. <p align="center">
  10. <a href="https://pypi.org/project/funasr/"><img src="https://img.shields.io/pypi/v/funasr" alt="PyPI"></a>
  11. <a href="https://github.com/modelscope/FunASR"><img src="https://img.shields.io/github/stars/modelscope/FunASR?style=social" alt="Stars"></a>
  12. <a href="https://pypi.org/project/funasr/"><img src="https://img.shields.io/pypi/dm/funasr" alt="Downloads"></a>
  13. <a href="https://modelscope.github.io/FunASR/"><img src="https://img.shields.io/badge/docs-online-blue" alt="Docs"></a>
  14. <a href="https://mcptoplist.com/server/io.github.modelscope%2Ffunasr-mcp"><img src="https://mcptoplist.com/badge/io.github.modelscope%2Ffunasr-mcp.svg" alt="MCP Toplist"></a>
  15. </p>
  16. <p align="center">
  17. <a href="https://trendshift.io/repositories/10479" target="_blank"><img src="https://trendshift.io/api/badge/repositories/10479" alt="modelscope%2FFunASR | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
  18. </p>
  19. <p align="center">
  20. <a href="#quick-start">Quick Start</a> · <a href="./docs/model_selection.md">Model selection</a> · <a href="#model-zoo">Models</a> · <a href="./docs/deployment_matrix.md">Deployment matrix</a> · <a href="https://www.funasr.com/">Deployment hub</a> · <a href="https://www.funasr.com/en/docs/">Docs</a> · <a href="#benchmark">Benchmark</a> · <a href="./CONTRIBUTING.md">Contribute</a>
  21. </p>
  22. ---
  23. ## Quick Start
  24. ### Native Transformers
  25. For Fun-ASR-Nano transcription with the Hugging Face API, start with the [Transformers 5.17.0 CPU quickstart](./docs/transformers_native.md). No FunASR toolkit or remote Python code is needed.
  26. [Space](https://huggingface.co/spaces/FunAudioLLM/Fun-ASR-Nano) · [Notebook](https://colab.research.google.com/github/QwenAudio/Fun-ASR/blob/main/examples/colab/fun_asr_nano_transformers.ipynb) · [Python / batch examples](https://github.com/QwenAudio/Fun-ASR/tree/main/examples/transformers)
  27. ### FunASR toolkit and pipelines
  28. [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/modelscope/FunASR/blob/main/examples/colab/funasr_quickstart.ipynb)
  29. No local setup? Open the [Colab quickstart](./examples/colab/) to transcribe a public sample or upload your own audio in a browser.
  30. Found FunASR useful? [Star the project](https://github.com/modelscope/FunASR) so more builders can find it.
  31. ```bash
  32. # CPU-only installs can use the default PyPI wheels.
  33. pip install torch torchaudio
  34. pip install funasr
  35. ```
  36. For GPU quickstarts, install the PyTorch and torchaudio wheels that match your
  37. NVIDIA driver from [pytorch.org](https://pytorch.org/get-started/locally/)
  38. before installing FunASR. After installation, confirm the GPU is visible:
  39. ```bash
  40. python - <<'PY'
  41. import torch
  42. print(torch.cuda.is_available())
  43. PY
  44. ```
  45. Only use `device="cuda"` when this prints `True`; otherwise use `device="cpu"`
  46. or reinstall PyTorch with the correct CUDA wheel.
  47. **FunASR toolkit GPU example: Fun-ASR-Nano** (Chinese, English, Japanese, and Chinese dialect groups and regional accents; the separate native Transformers CPU path is linked above):
  48. ```python
  49. from funasr import AutoModel
  50. model = AutoModel(model="FunAudioLLM/Fun-ASR-Nano-2512", device="cuda")
  51. result = model.generate(input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav")
  52. print(result[0]["text"])
  53. ```
  54. For the separate 31-language checkpoint, use
  55. [Fun-ASR-MLT-Nano-2512](https://huggingface.co/FunAudioLLM/Fun-ASR-MLT-Nano-2512).
  56. Language coverage is checkpoint-specific, so Nano and MLT-Nano should be treated as distinct model choices.
  57. For a CPU-first example with five-language ASR plus emotion and audio-event
  58. tags, use **SenseVoiceSmall**. The pipeline below combines it with FSMN-VAD and
  59. CAM++ for speaker-aware VAD segments; these are not native speaker outputs of
  60. the SenseVoiceSmall checkpoint.
  61. See the [SenseVoice paper](https://arxiv.org/abs/2407.04051),
  62. [Hugging Face checkpoint](https://huggingface.co/FunAudioLLM/SenseVoiceSmall),
  63. and [GGUF edge checkpoint](https://huggingface.co/FunAudioLLM/SenseVoiceSmall-GGUF).
  64. ```python
  65. from funasr import AutoModel
  66. from funasr.utils.postprocess_utils import rich_transcription_postprocess
  67. model = AutoModel(model="iic/SenseVoiceSmall", vad_model="fsmn-vad", spk_model="cam++", device="cpu")
  68. result = model.generate(
  69. input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav",
  70. batch_size_s=300,
  71. )
  72. # The AutoModel pipeline returns VAD segments with speaker ids and timestamps:
  73. for seg in result[0]["sentence_info"]:
  74. print(f"[{seg['start']/1000:.1f}s] Speaker {seg['spk']}: {rich_transcription_postprocess(seg['sentence'])}")
  75. ```
  76. This prints each returned segment's start time in seconds, anonymous speaker
  77. index, and text with SenseVoice tags removed. Text and segment boundaries depend
  78. on the audio and checkpoint; no fixed transcript is asserted here.
  79. CAM++ extracts `spk_embedding` vectors. `AutoModel` clusters those embeddings
  80. and assigns speaker indices to VAD segments. Indices are local to a recording,
  81. not known-person identities. See the [SDK contract](./docs/python_api.md) for
  82. the component and result boundaries. Change to `device="cuda"` only after
  83. verifying a compatible GPU environment as described above.
  84. ### Scale & deploy the flagship
  85. At scale, accelerate Fun-ASR-Nano with vLLM (batch processing):
  86. ```python
  87. from funasr.auto.auto_model_vllm import AutoModelVLLM
  88. model = AutoModelVLLM(model="FunAudioLLM/Fun-ASR-Nano-2512", tensor_parallel_size=1)
  89. results = model.generate(["audio1.wav", "audio2.wav"], language="auto")
  90. ```
  91. > **Deploy as API server:** [Local SenseVoice CPU recipe](#deploy) · [Nano GPU serving and pinned vLLM setup](./docs/vllm_guide.md)
  92. >
  93. > **Use with AI agents:** [MCP Server](examples/mcp_server/) for Claude/Cursor · [OpenAI API](examples/openai_api/) for LangChain/Dify/AutoGen
  94. >
  95. > **Use with voice agents:** [OpenClaw realtime plugin](integrations/openclaw/#compatibility) (experimental; requires an unmerged upstream SDK patch) · [Hugging Face speech-to-speech with SenseVoice](./docs/community_projects.md#speech-to-speech) (merged source checkout; not in v1.0.0)
  96. ### Why FunASR?
  97. FunASR is a toolkit: choose the task, checkpoint, and runtime separately.
  98. Support in one model or adapter does not imply support in every serving backend.
  99. | Task | Checkpoint or pipeline | Runtime entrypoint | Important limitation |
  100. |---|---|---|---|
  101. | File transcription with emotion/event tags | SenseVoiceSmall | Python `AutoModel`, CPU or GPU | Five-language checkpoint; tags do not identify speakers. |
  102. | 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. |
  103. | Broader multilingual transcription | Fun-ASR-MLT-Nano | Python `AutoModel` | Separate 31-language checkpoint; do not transfer its coverage to base Nano. |
  104. | Chunked live transcription | Paraformer-zh-streaming | Streaming SDK or runtime WebSocket service | Use the streaming checkpoint and per-session cache, not an offline checkpoint. |
  105. | Speaker-aware file transcription | SenseVoiceSmall + FSMN-VAD + CAM++ | `AutoModel` with VAD and embedding clustering | Anonymous indices within a recording, not enrolled-speaker identification. |
  106. | 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. |
  107. | Native CPU/edge transcription | Fun-ASR-Nano or SenseVoiceSmall GGUF | llama.cpp runtime | Requires matching converted weights; GGUF is not a Python `AutoModel` checkpoint. |
  108. See the [Model Zoo](./model_zoo/readme.md) and [deployment matrix](./docs/deployment_matrix.md)
  109. for checkpoint, interface, and licensing boundaries. Benchmark on your own audio
  110. and hardware before choosing a runtime.
  111. Trying FunASR for the first time? Use the [Colab quickstart](./examples/colab/) before setting up a local environment. Choosing a first model? Start with the [model selection guide](./docs/model_selection.md). Planning a switch from Whisper or a cloud ASR provider? Use the [migration guide](./docs/migration_from_whisper.md) and [benchmark example](./examples/migration/) to test representative audio, map features, and roll out safely.
  112. ---
  113. ## Installation
  114. ```bash
  115. pip install funasr
  116. ```
  117. <details><summary>From source / Requirements</summary>
  118. ```bash
  119. git clone https://github.com/modelscope/FunASR.git && cd FunASR
  120. pip install -e ./
  121. ```
  122. Requirements: Python ≥ 3.8. Install PyTorch + torchaudio first ([pytorch.org](https://pytorch.org/get-started/locally/)), then `pip install funasr`.
  123. </details>
  124. ---
  125. ## Model Zoo
  126. This list includes third-party models. **OpenMOSS** publishes MOSS-Transcribe-Diarize;
  127. FunASR provides an adapter, not ownership of its weights. Its unified path is
  128. offline, with anonymous labels scoped to each recording, not realtime or
  129. known-person identification. Model licenses are separate from the toolkit's MIT license.
  130. | Model | Task | Languages | Params | Links |
  131. |-------|------|-----------|--------|-------|
  132. | **Fun-ASR-Nano** | ASR | zh/en/ja + Chinese dialects and accents | 800M | [⭐](https://www.modelscope.cn/models/FunAudioLLM/Fun-ASR-Nano-2512) [HF / Transformers](https://huggingface.co/FunAudioLLM/Fun-ASR-Nano-2512-hf) · [HF / FunASR](https://huggingface.co/FunAudioLLM/Fun-ASR-Nano-2512) [GGUF](https://huggingface.co/FunAudioLLM/Fun-ASR-Nano-GGUF) |
  133. | **Fun-ASR-MLT-Nano** | ASR | 31 languages | 800M | [⭐](https://www.modelscope.cn/models/FunAudioLLM/Fun-ASR-MLT-Nano-2512) [🤗](https://huggingface.co/FunAudioLLM/Fun-ASR-MLT-Nano-2512) |
  134. | **SenseVoiceSmall** | ASR + emotion + events | zh/en/ja/ko/yue | 234M | [⭐](https://www.modelscope.cn/models/iic/SenseVoiceSmall) [🤗](https://huggingface.co/FunAudioLLM/SenseVoiceSmall) [GGUF](https://huggingface.co/FunAudioLLM/SenseVoiceSmall-GGUF) [paper](https://arxiv.org/abs/2407.04051) |
  135. | **MOSS-Transcribe-Diarize** | Third-party OpenMOSS: offline ASR + timestamps + anonymous speakers | See official card | See official card | [🤗](https://huggingface.co/OpenMOSS-Team/MOSS-Transcribe-Diarize) [guide](./docs/moss_transcribe_diarize.md) |
  136. | **Paraformer-zh** | ASR + timestamps | zh/en | 220M | [⭐](https://www.modelscope.cn/models/iic/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch/summary) [🤗](https://huggingface.co/funasr/paraformer-zh) |
  137. | Paraformer-zh-streaming | Streaming ASR | zh/en | 220M | [⭐](https://modelscope.cn/models/iic/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online/summary) [🤗](https://huggingface.co/funasr/paraformer-zh-streaming) |
  138. | Qwen3-ASR | ASR, 52 languages | multilingual | 1.7B | [usage](examples/industrial_data_pretraining/qwen3_asr) |
  139. | GLM-ASR-Nano | ASR, 17 languages | multilingual | 1.5B | [usage](examples/industrial_data_pretraining/glm_asr) |
  140. | Whisper-large-v3 | ASR + translation | multilingual | 1550M | [usage](examples/industrial_data_pretraining/whisper) |
  141. | Whisper-large-v3-turbo | ASR + translation | multilingual | 809M | [usage](examples/industrial_data_pretraining/whisper) |
  142. | ct-punc | Punctuation | zh/en | 290M | [⭐](https://modelscope.cn/models/iic/punc_ct-transformer_cn-en-common-vocab471067-large/summary) [🤗](https://huggingface.co/funasr/ct-punc) |
  143. | fsmn-vad | VAD | zh/en | 0.4M | [⭐](https://modelscope.cn/models/iic/speech_fsmn_vad_zh-cn-16k-common-pytorch/summary) [🤗](https://huggingface.co/funasr/fsmn-vad) |
  144. | cam++ | Speaker embeddings (pipeline component) | — | 7.2M | [⭐](https://modelscope.cn/models/iic/speech_campplus_sv_zh-cn_16k-common/summary) [🤗](https://huggingface.co/funasr/campplus) |
  145. | emotion2vec+large | Emotion recognition | — | 300M | [⭐](https://modelscope.cn/models/iic/emotion2vec_plus_large/summary) [🤗](https://huggingface.co/emotion2vec/emotion2vec_plus_large) |
  146. ---
  147. ## Usage
  148. > [Python tutorial](./docs/tutorial/README.md) · [SDK parameters and outputs](./docs/python_api.md) · [Training](./docs/training.md) · [Model registration](./docs/model_registration.md)
  149. ```python
  150. from funasr import AutoModel
  151. # Chinese production (VAD + ASR + punctuation + speaker)
  152. model = AutoModel(model="paraformer-zh", vad_model="fsmn-vad", punc_model="ct-punc", spk_model="cam++", device="cuda")
  153. result = model.generate(input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav", hotword="关键词 20")
  154. # Optional Silero VAD (install first: python -m pip install "funasr[silero]")
  155. model = AutoModel(
  156. model="paraformer-zh", vad_model="silero-vad", device="cuda",
  157. vad_kwargs={"silero_threshold": 0.5, "silero_min_silence_duration_ms": 100},
  158. )
  159. result = model.generate(input="audio.wav")
  160. # Streaming real-time (feed audio chunk by chunk)
  161. import soundfile as sf
  162. model = AutoModel(model="paraformer-zh-streaming", device="cuda")
  163. audio, sr = sf.read("speech.wav", dtype="float32") # 16 kHz mono
  164. chunk_size = [0, 10, 5] # 600 ms chunks
  165. chunk_stride = chunk_size[1] * 960
  166. cache = {}
  167. n_chunks = (len(audio) - 1) // chunk_stride + 1
  168. for i in range(n_chunks):
  169. chunk = audio[i * chunk_stride : (i + 1) * chunk_stride]
  170. res = model.generate(input=chunk, cache=cache, is_final=(i == n_chunks - 1),
  171. chunk_size=chunk_size, encoder_chunk_look_back=4, decoder_chunk_look_back=1)
  172. if res[0]["text"]:
  173. print(res[0]["text"], end="", flush=True)
  174. # Emotion recognition
  175. model = AutoModel(model="emotion2vec_plus_large", device="cuda")
  176. result = model.generate(input="audio.wav", granularity="utterance")
  177. ```
  178. ### CLI (Agent-Friendly)
  179. ```bash
  180. # Transcribe audio (simplest)
  181. funasr audio.wav
  182. # JSON output (for AI agents)
  183. funasr audio.wav --output-format json
  184. # SRT subtitles
  185. funasr audio.wav --output-format srt --output-dir ./subs
  186. # Speaker diarization + timestamps
  187. funasr audio.wav --spk --timestamps -f json
  188. # Choose model and language
  189. funasr audio.wav --model paraformer --language zh
  190. # Batch transcribe
  191. funasr *.wav --output-format srt --output-dir ./output
  192. ```
  193. Available models: `sensevoice` (default), `paraformer`, `paraformer-en`, `fun-asr-nano`
  194. ---
  195. ## Deploy
  196. Start a local SenseVoice CPU service from a fresh directory in a POSIX shell with
  197. Python 3.11. This installs the PyPI release into a separate environment, not this
  198. source checkout. Keep the unauthenticated service on loopback; use the
  199. [security guide](./examples/openai_api/SECURITY.md) before exposing it to other clients.
  200. ```bash
  201. python3.11 -m venv .venv-funasr-http
  202. . .venv-funasr-http/bin/activate
  203. python -m pip install torch torchaudio
  204. python -m pip install funasr fastapi uvicorn python-multipart
  205. python -m pip check
  206. funasr-server --host 127.0.0.1 --port 8000 --model sensevoice --device cpu
  207. ```
  208. Wait for model download and server startup. In a second terminal, use the same
  209. directory and curl 7.76+ to download a public Chinese audio sample and transcribe it.
  210. The request uses the preloaded model; no fixed transcript or speaker labels are promised.
  211. ```bash
  212. curl --fail --location https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/BAC009S0764W0121.wav -o sample.wav && \
  213. curl --fail-with-body http://127.0.0.1:8000/v1/audio/transcriptions \
  214. -F file=@sample.wav \
  215. -F model=sensevoice \
  216. -F response_format=verbose_json
  217. ```
  218. For offline joint ASR and anonymous speaker labels (`moss-transcribe-diarize`), prepare the separate environment
  219. in the [MOSS service, Docker, Kubernetes, vLLM, SGLang, LocalAI, and FunClip guide →](./docs/moss_transcribe_diarize.md).
  220. It is an alternative service, not another command in the CPU environment. Stop the
  221. CPU service before reusing port 8000. For Nano GPU serving, follow the
  222. [pinned split-engine guide](./docs/vllm_guide.md) and inspect the actual backend logs;
  223. selecting a model does not by itself prove that vLLM was loaded.
  224. ```bash
  225. # Docker streaming service
  226. docker pull registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.12
  227. ```
  228. ### CPU / Edge — llama.cpp / GGUF (no GPU, no Python)
  229. Run **SenseVoice / Paraformer / Fun-ASR-Nano** as a **single self-contained binary** on CPU and edge devices — this is to FunASR what [whisper.cpp](https://github.com/ggml-org/whisper.cpp) is to Whisper, but with **~3× lower CER than whisper.cpp on Chinese**. Built-in FSMN-VAD, no Python at runtime.
  230. ```bash
  231. # Linux / macOS: run from the extracted release directory
  232. bash download-funasr-model.sh sensevoice ./gguf # or: paraformer | nano
  233. ./llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav
  234. # → 欢迎大家来体验达摩院推出的语音识别模型
  235. ```
  236. ```powershell
  237. # Windows PowerShell: run from the extracted archive root (with the `hf` CLI installed)
  238. hf download FunAudioLLM/SenseVoiceSmall-GGUF sensevoice-small-q8.gguf --local-dir .\gguf
  239. hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf
  240. .\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav
  241. # Use the windows-x64-vulkan package with a current AMD, Intel, or NVIDIA Vulkan driver:
  242. .\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav --backend vulkan
  243. # Use the windows-x64-cuda package on RTX 30-class GPUs:
  244. .\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav --backend cuda
  245. ```
  246. Use `funasr-llamacpp-linux-x64-vulkan.tar.gz` on Linux GPU systems with a
  247. working Vulkan driver/ICD:
  248. ```bash
  249. ./llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav --backend vulkan
  250. ```
  251. The Windows Vulkan ZIP uses the system Vulkan loader supplied by the GPU driver;
  252. installing the Vulkan SDK is only necessary when building from source. Both
  253. Vulkan packages currently accelerate SenseVoiceSmall.
  254. Tagged releases provide two Windows CUDA packages. The standard
  255. `windows-x64-cuda` ZIP targets CUDA architecture 86, while
  256. `windows-x64-cuda-blackwell` targets architecture 120 (`sm_120`) for RTX 50 /
  257. Blackwell GPUs. Both ZIPs bundle the required cuBLAS DLLs and use the static MSVC
  258. runtime, so users need a compatible NVIDIA driver but not a separate CUDA Toolkit
  259. installation. CI verifies the architecture and package boundary; it does not prove
  260. inference on physical Blackwell hardware.
  261. **Prebuilt binaries:** [Releases](https://github.com/modelscope/FunASR/releases) · [v0.2.6](https://github.com/modelscope/FunASR/releases/tag/runtime-llamacpp-v0.2.6) · [Linux Vulkan tarball](https://github.com/modelscope/FunASR/releases/download/runtime-llamacpp-v0.2.6/funasr-llamacpp-linux-x64-vulkan.tar.gz) · [Windows Vulkan zip](https://github.com/modelscope/FunASR/releases/download/runtime-llamacpp-v0.2.6/funasr-llamacpp-windows-x64-vulkan.zip) · [Windows CUDA zip](https://github.com/modelscope/FunASR/releases/download/runtime-llamacpp-v0.2.6/funasr-llamacpp-windows-x64-cuda.zip) · [Windows Blackwell CUDA zip](https://github.com/modelscope/FunASR/releases/download/runtime-llamacpp-v0.2.6/funasr-llamacpp-windows-x64-cuda-blackwell.zip) · **Download & quickstart:** [funasr.com/deploy/llama-cpp](https://www.funasr.com/en/deploy/llama-cpp.html) · **GGUF models:** [Hugging Face](https://huggingface.co/FunAudioLLM) · **Docs & benchmarks:** [runtime/llama.cpp/](./runtime/llama.cpp/)
  262. [OpenAI API example →](./examples/openai_api/) · [Gradio demo →](./examples/openai_api/GRADIO.md) · [Client recipes →](./examples/openai_api/CLIENTS.md) · [JavaScript/TypeScript recipes →](./examples/openai_api/JAVASCRIPT.md) · [Kubernetes template →](./examples/openai_api/kubernetes/) · [Workflow recipes →](./examples/openai_api/WORKFLOWS.md) · [Postman collection →](./examples/openai_api/POSTMAN.md) · [OpenAPI spec →](./examples/openai_api/OPENAPI.md) · [Security guide →](./examples/openai_api/SECURITY.md) · [Deployment matrix →](./docs/deployment_matrix.md) · [Deployment docs →](./runtime/readme.md) · [Agent integration →](https://modelscope.github.io/FunASR/agent.html)
  263. ---
  264. ## Benchmark
  265. The [historical benchmark report](https://modelscope.github.io/FunASR/benchmark.html)
  266. and [split-engine measurements](./docs/vllm_guide.md#benchmark) retain their
  267. original results. They are separate records, not universal speed rankings or
  268. production capacity guarantees.
  269. Use the [RTFx and reproducibility notes](./docs/benchmark/rtf_reproducibility.md)
  270. to compare checkpoint/revision, audio set, hardware, batching, warmup, timing
  271. scope, and CER/WER. Offline throughput is not streaming latency. The
  272. [migration benchmark example](./examples/migration/) helps measure your own
  273. recordings with the same evaluation scope.
  274. ---
  275. ## What's new
  276. - **MOSS-Transcribe-Diarize** brings long-form ASR, timestamps, and anonymous speaker labels to FunASR services, Docker, Kubernetes, vLLM/SGLang workflows, and FunClip. [Deploy MOSS ->](./docs/moss_transcribe_diarize.md)
  277. - **FunASR 1.4.27** accepts int16 and multichannel NumPy audio arrays, handles zero-duration VAD results, preserves sentence timestamp output when punctuation is absent, and skips blank segmentation-dictionary lines. [#3890](https://github.com/modelscope/FunASR/pull/3890), [#3891](https://github.com/modelscope/FunASR/pull/3891), [#3896](https://github.com/modelscope/FunASR/pull/3896), [#3898](https://github.com/modelscope/FunASR/pull/3898), [#3903](https://github.com/modelscope/FunASR/pull/3903). `python -m pip install -U "funasr==1.4.27"`. [Release and verification scope ->](https://github.com/modelscope/FunASR/releases/tag/v1.4.27)
  278. **FunASR 1.4.26** preserves word spaces between English/Korean VAD segments and returns plain text for HTTP `response_format=text`. [#3874](https://github.com/modelscope/FunASR/pull/3874), [#3883](https://github.com/modelscope/FunASR/pull/3883). `python -m pip install -U "funasr==1.4.26"`. [Release / 验证范围](https://github.com/modelscope/FunASR/releases/tag/v1.4.26)
  279. **FunASR 1.4.25** restores Python 3.12 boolean argument parsing without `distutils` and preserves normalized error messages; removes synthetic leading spaces from Latin sentence timestamps while preserving boundaries and raw text. [Fix #3863](https://github.com/modelscope/FunASR/pull/3863), [fix #3866](https://github.com/modelscope/FunASR/pull/3866). Install with `python -m pip install -U "funasr==1.4.25"`. [Release and verification scope ->](https://github.com/modelscope/FunASR/releases/tag/v1.4.25)
  280. **FunASR 1.4.24** ignores empty non-linguistic symbols to prevent tokenizer loops, fixes padded variance normalization, and prevents CIF crashes in mixed batches containing zero-fire samples. [Fix #3852](https://github.com/modelscope/FunASR/pull/3852), [fix #3853](https://github.com/modelscope/FunASR/pull/3853), [fix #3854](https://github.com/modelscope/FunASR/pull/3854). A checkpoint trained with both `norm_means=True` and `norm_vars=True` needs recognition-quality reevaluation because normalized features change; `norm_vars=False` remains the default. Install with `python -m pip install -U "funasr==1.4.24"`. [Release and verification scope ->](https://github.com/modelscope/FunASR/releases/tag/v1.4.24)
  281. **FunASR 1.4.23** fixes the online frontend cursor for `lfr_m=lfr_n=1` and redundant empty final offline VAD chunks. With a supplied `token_list`, SentencePiece `ids2tokens` returns model pieces; use `tokens2text` for text. Without `token_list`, legacy text decoding is unchanged. [Fix #3849](https://github.com/modelscope/FunASR/pull/3849), [fix #3783](https://github.com/modelscope/FunASR/pull/3783). [Release and verification scope ->](https://github.com/modelscope/FunASR/releases/tag/v1.4.23)
  282. **FunASR 1.4.22** honors per-call `merge_length_s` and evaluates dynamic VAD silence thresholds per frame using the current segment duration, preserving the fixed-threshold opt-out. [Fix #3841](https://github.com/modelscope/FunASR/pull/3841), [fix #3833](https://github.com/modelscope/FunASR/pull/3833). [Release and verification scope ->](https://github.com/modelscope/FunASR/releases/tag/v1.4.22)
  283. **FunASR 1.4.21** preserves the streaming punctuation cache on empty or whitespace chunks; nonempty inference is unchanged. [Fix #3824](https://github.com/modelscope/FunASR/pull/3824). [Release and verification scope ->](https://github.com/modelscope/FunASR/releases/tag/v1.4.21)
  284. **FunASR 1.4.20** preserves the original optional speaker dependency failure in a chained `ImportError` when `spk_model` is requested, while ASR-only construction remains available. [Fix #3819](https://github.com/modelscope/FunASR/pull/3819). [Release and verification scope ->](https://github.com/modelscope/FunASR/releases/tag/v1.4.20)
  285. **FunASR 1.4.19** handles empty-token Paraformer batches, enforces `max_speakers` for automatic clustering, and adds validated JSON-object `--hf_overrides` support to realtime WebSocket serving. [Release and verification scope ->](https://github.com/modelscope/FunASR/releases/tag/v1.4.19)
  286. Previous release **FunASR 1.4.18** fixes cross-script hotword misreplacement, filtered-token timestamp alignment, and Chinese VAD sentence/speaker drift. [Release and verification scope ->](https://github.com/modelscope/FunASR/releases/tag/v1.4.18)
  287. **Earlier release: FunASR 1.4.17** adds explicit PCM16 input and improves timestamp, hotword, speaker-sample-rate, and long-segment streaming handling. [Release and verification scope ->](https://github.com/modelscope/FunASR/releases/tag/v1.4.17)
  288. **Earlier release: FunASR 1.4.16** preserves explicit VAD, punctuation, and speaker-model device placement across inference calls, and adds tested native Transformers adoption guides. [Release and verification scope ->](https://github.com/modelscope/FunASR/releases/tag/v1.4.16)
  289. - **Native Transformers:** Released **5.17.0** supports Fun-ASR-Nano with the official `-hf` checkpoint, CPU examples and a notebook. [Get started ->](./docs/transformers_native.md)
  290. > See [GitHub Releases](https://github.com/modelscope/FunASR/releases) for the complete changelog and downloadable assets.
  291. ---
  292. ## Community
  293. Start with [troubleshooting](./docs/troubleshooting.md) before reporting a problem.
  294. Include your exact model, runtime, environment and a minimal reproduction.
  295. | | |
  296. |---|---|
  297. | 📖 [Documentation](https://modelscope.github.io/FunASR/) | 🐛 [Issues](https://github.com/modelscope/FunASR/issues) |
  298. | 💬 [Discussions](https://github.com/modelscope/FunASR/discussions) | 🤗 [HuggingFace](https://huggingface.co/funasr) |
  299. | 🤝 [Contributing](./CONTRIBUTING.md) | 🌐 [funasr.com](https://www.funasr.com) |
  300. | 🗺️ [Repository roles & roadmap](./docs/repository_roles.md) | 📈 [Growth plan](./docs/community_growth_20k.md) |
  301. | 🧩 [Community projects](./docs/community_projects.md) | 💡 [Use-case showcase](./docs/use_case_showcase.md) |
  302. ## Star History
  303. <a href="https://star-history.com/#modelscope/FunASR&Date">
  304. <picture>
  305. <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=modelscope/FunASR&type=Date&theme=dark" />
  306. <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=modelscope/FunASR&type=Date" />
  307. <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=modelscope/FunASR&type=Date" width="600" />
  308. </picture>
  309. </a>
  310. ## License
  311. - FunASR toolkit source code in this repository: [MIT License](./LICENSE).
  312. - Pretrained model weights are licensed separately. Check the license shown on each model card; when a model card links to the [FunASR Model Open Source License Agreement](./MODEL_LICENSE), those terms apply.
  313. ## Citations
  314. ```bibtex
  315. @inproceedings{gao2023funasr,
  316. author={Zhifu Gao and others},
  317. title={FunASR: A Fundamental End-to-End Speech Recognition Toolkit},
  318. booktitle={INTERSPEECH},
  319. year={2023}
  320. }
  321. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.