From f1d86e9dd54b08f3ef41b3d327eb2c5b8ea59b50 Mon Sep 17 00:00:00 2001
From: shixian.shi <shixian.shi@alibaba-inc.com>
Date: 星期四, 28 十二月 2023 17:47:16 +0800
Subject: [PATCH] update scripts

---
 examples/industrial_data_pretraining/paraformer-long/infer.sh  |   10 +++++-----
 examples/industrial_data_pretraining/seaco_paraformer/infer.sh |    8 ++++++++
 examples/industrial_data_pretraining/seaco_paraformer/demo.py  |    8 ++++++--
 examples/industrial_data_pretraining/paraformer-long/demo.py   |    8 ++++----
 4 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/examples/industrial_data_pretraining/paraformer-long/demo.py b/examples/industrial_data_pretraining/paraformer-long/demo.py
index e45cae8..ca61ee3 100644
--- a/examples/industrial_data_pretraining/paraformer-long/demo.py
+++ b/examples/industrial_data_pretraining/paraformer-long/demo.py
@@ -5,10 +5,10 @@
 
 from funasr import AutoModel
 
-model = AutoModel(model="/Users/zhifu/Downloads/modelscope_models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch",
-                  vad_model="/Users/zhifu/Downloads/modelscope_models/speech_fsmn_vad_zh-cn-16k-common-pytorch",
-                  punc_model="/Users/zhifu/Downloads/modelscope_models/punc_ct-transformer_zh-cn-common-vocab272727-pytorch",
+model = AutoModel(model="../modelscope_models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch",
+                  vad_model="../modelscope_models/speech_fsmn_vad_zh-cn-16k-common-pytorch",
+                  punc_model="../modelscope_models/punc_ct-transformer_zh-cn-common-vocab272727-pytorch",
                   )
 
-res = model(input="/Users/zhifu/Downloads/modelscope_models/speech_fsmn_vad_zh-cn-16k-common-pytorch/example/vad_example.wav", batch_size_s=300, batch_size_threshold_s=60)
+res = model(input="../modelscope_models/speech_fsmn_vad_zh-cn-16k-common-pytorch/example/asr_example.wav", batch_size_s=300, batch_size_threshold_s=60)
 print(res)
\ No newline at end of file
diff --git a/examples/industrial_data_pretraining/paraformer-long/infer.sh b/examples/industrial_data_pretraining/paraformer-long/infer.sh
index fc2a09a..8f6ea13 100644
--- a/examples/industrial_data_pretraining/paraformer-long/infer.sh
+++ b/examples/industrial_data_pretraining/paraformer-long/infer.sh
@@ -1,22 +1,22 @@
 
 # download model
-local_path_root=./modelscope_models
+local_path_root=../modelscope_models
 mkdir -p ${local_path_root}
 
 local_path=${local_path_root}/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch
 git clone https://www.modelscope.cn/damo/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404.git ${local_path}
 
 local_path_vad=${local_path_root}/speech_fsmn_vad_zh-cn-16k-common-pytorch
-git clone https://www.modelscope.cn/damo/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404.git ${local_path_vad}
+git clone https://www.modelscope.cn/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch.git ${local_path_vad}
 
 local_path_punc=${local_path_root}/punc_ct-transformer_zh-cn-common-vocab272727-pytorch
-git clone https://www.modelscope.cn/damo/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404.git ${local_path_punc}
+git clone https://www.modelscope.cn/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch.git ${local_path_punc}
 
 
 python funasr/bin/inference.py \
 +model="${local_path}" \
-+vad_model="${local_path_vad}"
-+punc_model="${local_path_punc}"
++vad_model="${local_path_vad}" \
++punc_model="${local_path_punc}" \
 +input="${local_path}/example/asr_example.wav" \
 +output_dir="./outputs/debug" \
 +device="cpu" \
diff --git a/examples/industrial_data_pretraining/seaco_paraformer/demo.py b/examples/industrial_data_pretraining/seaco_paraformer/demo.py
index 2e6d203..039d3f3 100644
--- a/examples/industrial_data_pretraining/seaco_paraformer/demo.py
+++ b/examples/industrial_data_pretraining/seaco_paraformer/demo.py
@@ -5,8 +5,12 @@
 
 from funasr import AutoModel
 
-model = AutoModel(model="../modelscope_models/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404")
+model = AutoModel(model="../modelscope_models/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404",
+                  )
+
+#vad_model="../modelscope_models/speech_fsmn_vad_zh-cn-16k-common-pytorch",
+#punc_model="../modelscope_models/punc_ct-transformer_zh-cn-common-vocab272727-pytorch"
 
 res = model(input="../modelscope_models/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404/example/asr_example.wav",
-            hotword='杈炬懇闄� 榄旀惌')
+            hotword='杈炬懇闄� 纾ㄦ惌')
 print(res)
\ No newline at end of file
diff --git a/examples/industrial_data_pretraining/seaco_paraformer/infer.sh b/examples/industrial_data_pretraining/seaco_paraformer/infer.sh
index a39083b..121c610 100644
--- a/examples/industrial_data_pretraining/seaco_paraformer/infer.sh
+++ b/examples/industrial_data_pretraining/seaco_paraformer/infer.sh
@@ -2,9 +2,15 @@
 # download model
 local_path_root=../modelscope_models
 mkdir -p ${local_path_root}
+
 local_path=${local_path_root}/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch
 git clone https://www.modelscope.cn/damo/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch.git ${local_path}
 
+#local_path_vad=${local_path_root}/speech_fsmn_vad_zh-cn-16k-common-pytorch
+#git clone https://www.modelscope.cn/damo/speech_fsmn_vad_zh-cn-16k-common-pytorch.git ${local_path_vad}
+
+#local_path_punc=${local_path_root}/punc_ct-transformer_zh-cn-common-vocab272727-pytorch
+#git clone https://www.modelscope.cn/damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch.git ${local_path_punc}
 
 python funasr/bin/inference.py \
 +model="${local_path}" \
@@ -13,3 +19,5 @@
 +device="cpu" \
 +"hotword='杈炬懇闄� 榄旀惌'"
 
+#+vad_model="${local_path_vad}" \
+#+punc_model="${local_path_punc}" \
\ No newline at end of file

--
Gitblit v1.9.1