From 0dd01a880b8a7ed1d4549ee9b3a3d224e6fa1409 Mon Sep 17 00:00:00 2001
From: Xian Shi <40013335+R1ckShi@users.noreply.github.com>
Date: 星期二, 17 十月 2023 16:47:40 +0800
Subject: [PATCH] Merge pull request #855 from alibaba-damo-academy/dev_onnx
---
funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py | 8 --------
funasr/runtime/python/onnxruntime/demo_contextual_paraformer.py | 1 +
2 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/funasr/runtime/python/onnxruntime/demo_contextual_paraformer.py b/funasr/runtime/python/onnxruntime/demo_contextual_paraformer.py
index 9da3817..3b698e6 100644
--- a/funasr/runtime/python/onnxruntime/demo_contextual_paraformer.py
+++ b/funasr/runtime/python/onnxruntime/demo_contextual_paraformer.py
@@ -5,6 +5,7 @@
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 = '闅忔満鐑瘝 鍚勭鐑瘝 榄旀惌 闃块噷宸村反 浠�'
result = model(wav_path, hotwords)
diff --git a/funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py b/funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py
index 8727896..71cf434 100644
--- a/funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py
+++ b/funasr/runtime/python/onnxruntime/funasr_onnx/paraformer_bin.py
@@ -242,14 +242,6 @@
if not Path(model_dir).exists():
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:
raise "model_dir must be model_name in modelscope or local path downloaded from modelscope, but is {}".format(model_dir)
--
Gitblit v1.9.1