Skip to content

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

Merge branch 'main' into dev_onnx

Xian Shia05e753d11d9
diff --cc funasr/runtime/python/onnxruntime/demo_contextual_paraformer.py
index 984c0d6bc,9da3817ac..3b698e641
--- a/funasr/runtime/python/onnxruntime/demo_contextual_paraformer.py
+++ b/funasr/runtime/python/onnxruntime/demo_contextual_paraformer.py
@@@ -5,7 -5,7 +5,8 @@@ model_dir = "./export/damo/speech_paraf
model = ContextualParaformer(model_dir, batch_size=1)
wav_path = ['{}/.cache/modelscope/hub/damo/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404/example/asr_example.wav'.format(Path.home())]
- hotwords = '随机热词 各种热词 魔搭 阿里巴巴'
++
+ hotwords = '随机热词 各种热词 魔搭 阿里巴巴 仏'
result = model(wav_path, hotwords)
print(result)
diff --cc funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py
index c9940363e,8727896d2..71cf434db
--- a/funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py
+++ b/funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py
@@@ -229,7 -241,14 +241,6 @@@ class ContextualParaformer(Paraformer)
):
if not Path(model_dir).exists():
- from modelscope.hub.snapshot_download import snapshot_download
- try:
- from modelscope.hub.snapshot_download import snapshot_download
- except:
- raise "You are exporting model from modelscope, please install modelscope and try it again. To install modelscope, you could:\n" \
- "\npip3 install -U modelscope\n" \
- "For the users in China, you could install with the command:\n" \
- "\npip3 install -U modelscope -i https://mirror.sjtu.edu.cn/pypi/web/simple"
-
try:
model_dir = snapshot_download(model_dir, cache_dir=cache_dir)
except: