Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
sensevoice
游雁374998bd363e
diff --git a/examples/README.md b/examples/README.mdindex 0191a2d8a..fe9a0ed93 100644--- a/examples/README.md+++ b/examples/README.md@@ -69,6 +69,34 @@ res = model.generate(input=[str], output_dir=[str])#### Speech Recognition (Non-streaming)+##### SenseVoice+```python+from funasr import AutoModel+from funasr.utils.postprocess_utils import rich_transcription_postprocess++model_dir = "iic/SenseVoiceSmall"++model = AutoModel(+ model=model_dir,+ vad_model="fsmn-vad",+ vad_kwargs={"max_single_segment_time": 30000},+ device="cuda:0",+)++# en+res = model.generate(+ input=f"{model.model_path}/example/en.mp3",+ cache={},+ language="auto", # "zn", "en", "yue", "ja", "ko", "nospeech"+ use_itn=True,+ batch_size_s=60,+ merge_vad=True, #+ merge_length_s=15,+)+text = rich_transcription_postprocess(res[0]["text"])+print(text)+```+##### Paraformer```pythonfrom funasr import AutoModel# paraformer-zh is a multi-functional asr modeldiff --git a/examples/README_zh.md b/examples/README_zh.mdindex b0a666512..f95ee64df 100644--- a/examples/README_zh.md+++ b/examples/README_zh.md@@ -70,6 +70,34 @@ res = model.generate(input=[str], output_dir=[str])#### 非实时语音识别+##### SenseVoice+```python+from funasr import AutoModel+from funasr.utils.postprocess_utils import rich_transcription_postprocess++model_dir = "iic/SenseVoiceSmall"++model = AutoModel(+ model=model_dir,+ vad_model="fsmn-vad",+ vad_kwargs={"max_single_segment_time": 30000},+ device="cuda:0",+)++# en+res = model.generate(+ input=f"{model.model_path}/example/en.mp3",+ cache={},+ language="auto", # "zn", "en", "yue", "ja", "ko", "nospeech"+ use_itn=True,+ batch_size_s=60,+ merge_vad=True, #+ merge_length_s=15,+)+text = rich_transcription_postprocess(res[0]["text"])+print(text)+```+##### Paraformer```pythonfrom funasr import AutoModel# paraformer-zh is a multi-functional asr model