| 1 | ([简体中文](./README_zh.md)|English|[日本語](./README_ja.md)|[한국어](./README_ko.md)) |
| 2 | |
| 3 | <p align="center"> |
| 4 | <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> |
| 5 | </p> |
| 6 | |
| 7 | <p align="center"> |
| 8 | <strong>Industrial speech recognition toolkit for offline, streaming, and edge deployment.</strong><br> |
| 9 | <em>ASR · VAD · punctuation · speaker pipelines · emotion and audio-event models · OpenAI-compatible serving</em> |
| 10 | </p> |
| 11 | |
| 12 | <p align="center"> |
| 13 | <a href="https://pypi.org/project/funasr/"><img src="https://img.shields.io/pypi/v/funasr" alt="PyPI"></a> |
| 14 | <a href="https://github.com/modelscope/FunASR"><img src="https://img.shields.io/github/stars/modelscope/FunASR?style=social" alt="Stars"></a> |
| 15 | <a href="https://pypi.org/project/funasr/"><img src="https://img.shields.io/pypi/dm/funasr" alt="Downloads"></a> |
| 16 | <a href="https://modelscope.github.io/FunASR/"><img src="https://img.shields.io/badge/docs-online-blue" alt="Docs"></a> |
| 17 | </p> |
| 18 | |
| 19 | <p align="center"> |
| 20 | <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> |
| 21 | </p> |
| 22 | |
| 23 | <p align="center"> |
| 24 | <a href="#quick-start">Quick Start</a> · <a href="./examples/colab/">Colab</a> · <a href="#benchmark">Benchmark</a> · <a href="./docs/model_selection.md">Model selection</a> · <a href="./docs/migration_from_whisper.md">Migration guide</a> · <a href="./docs/use_case_showcase.md">Use cases</a> · <a href="./docs/community_projects.md">Community integrations</a> · <a href="./docs/deployment_matrix.md">Deployment matrix</a> · <a href="#model-zoo">Models</a> · <a href="https://modelscope.github.io/FunASR/agent.html">Agent Integration</a> · <a href="https://modelscope.github.io/FunASR/">Docs</a> · <a href="./CONTRIBUTING.md">Contribute</a> |
| 25 | </p> |
| 26 | |
| 27 | --- |
| 28 | |
| 29 | ## Quick Start |
| 30 | |
| 31 | [](https://colab.research.google.com/github/modelscope/FunASR/blob/main/examples/colab/funasr_quickstart.ipynb) |
| 32 | |
| 33 | No local setup? Open the [Colab quickstart](./examples/colab/) to transcribe a public sample or upload your own audio in a browser. |
| 34 | |
| 35 | ```bash |
| 36 | pip install torch torchaudio |
| 37 | pip install funasr |
| 38 | ``` |
| 39 | |
| 40 | **Flagship model — Fun-ASR-Nano** (LLM-ASR for Chinese, English, and Japanese, plus Chinese dialect groups and regional accents; needs a GPU): |
| 41 | |
| 42 | ```python |
| 43 | from funasr import AutoModel |
| 44 | |
| 45 | model = AutoModel(model="FunAudioLLM/Fun-ASR-Nano-2512", device="cuda") |
| 46 | result = model.generate(input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav") |
| 47 | print(result[0]["text"]) |
| 48 | # 欢迎大家来体验达摩院推出的语音识别模型。 |
| 49 | ``` |
| 50 | |
| 51 | For the separate 31-language checkpoint, use |
| 52 | [Fun-ASR-MLT-Nano-2512](https://huggingface.co/FunAudioLLM/Fun-ASR-MLT-Nano-2512). |
| 53 | Language coverage is checkpoint-specific, so Nano and MLT-Nano should be treated as distinct model choices. |
| 54 | |
| 55 | On CPU (or for five-language ASR plus emotion and audio-event tags), use |
| 56 | **SenseVoiceSmall**. The pipeline below composes SenseVoiceSmall with FSMN-VAD |
| 57 | and CAM++; diarization is provided by the separate CAM++ model, not by the |
| 58 | SenseVoiceSmall checkpoint: |
| 59 | See the [SenseVoice paper](https://arxiv.org/abs/2407.04051), |
| 60 | [Hugging Face checkpoint](https://huggingface.co/FunAudioLLM/SenseVoiceSmall), |
| 61 | and [GGUF edge checkpoint](https://huggingface.co/FunAudioLLM/SenseVoiceSmall-GGUF). |
| 62 | |
| 63 | ```python |
| 64 | from funasr import AutoModel |
| 65 | from funasr.utils.postprocess_utils import rich_transcription_postprocess |
| 66 | |
| 67 | model = AutoModel(model="iic/SenseVoiceSmall", vad_model="fsmn-vad", spk_model="cam++", device="cuda") # use device="cpu" if you don't have a GPU |
| 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 | |
| 73 | # The |