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
docs(README): make the quickstart runnable (add missing model.generate() call + CPU note) (#3010)
zhifu gaob0ef72a92ad0
diff --git a/README.md b/README.mdindex 03af1681c..d8efff4b0 100644--- a/README.md+++ b/README.md@@ -41,9 +41,14 @@ pip install funasrfrom funasr import AutoModelfrom funasr.utils.postprocess_utils import rich_transcription_postprocess-model = AutoModel(model="iic/SenseVoiceSmall", vad_model="fsmn-vad", spk_model="cam++", device="cuda")+model = AutoModel(model="iic/SenseVoiceSmall", vad_model="fsmn-vad", spk_model="cam++", device="cuda") # use device="cpu" if you don't have a GPUresult = model.generate(input="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav")+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,+)+# One call returns VAD segments with speaker id + timestamps — render them however you like:for seg in result[0]["sentence_info"]:print(f"[{seg['start']/1000:.1f}s] Speaker {seg['spk']}: {rich_transcription_postprocess(seg['sentence'])}")