From b221246bac54bdb2a3808499872fd35c1a6cc08a Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期三, 27 十二月 2023 16:44:37 +0800
Subject: [PATCH] funasr1.0

---
 examples/industrial_data_pretraining/paraformer-large-long/infer.sh |   44 +++++++++++++++++++-------------------------
 1 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/examples/industrial_data_pretraining/paraformer-large-long/infer.sh b/examples/industrial_data_pretraining/paraformer-large-long/infer.sh
index 2e6ec0d..fc2a09a 100644
--- a/examples/industrial_data_pretraining/paraformer-large-long/infer.sh
+++ b/examples/industrial_data_pretraining/paraformer-large-long/infer.sh
@@ -1,32 +1,26 @@
 
-cmd="funasr/bin/inference.py"
+# download model
+local_path_root=./modelscope_models
+mkdir -p ${local_path_root}
 
-python $cmd \
-+model="/Users/zhifu/Downloads/modelscope_models/speech_paraformer-large-vad-punc_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" \
-+input="/Users/zhifu/funasr_github/test_local/vad_example.wav" \
-+output_dir="/Users/zhifu/Downloads/ckpt/funasr2/exp2" \
+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}
+
+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}
+
+
+python funasr/bin/inference.py \
++model="${local_path}" \
++vad_model="${local_path_vad}"
++punc_model="${local_path_punc}"
++input="${local_path}/example/asr_example.wav" \
++output_dir="./outputs/debug" \
 +device="cpu" \
 +batch_size_s=300 \
 +batch_size_threshold_s=60 \
 +debug="true"
 
-#python $cmd \
-#+model="/Users/zhifu/Downloads/modelscope_models/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404" \
-#+input="/Users/zhifu/Downloads/asr_example.wav" \
-#+output_dir="/Users/zhifu/Downloads/ckpt/funasr2/exp2" \
-#+device="cpu" \
-#+"hotword='杈鹃瓟闄� 榄旀惌'"
-
-#+input="/Users/zhifu/funasr_github/test_local/wav.scp"
-#+input="/Users/zhifu/funasr_github/test_local/asr_example.wav" \
-#+input="/Users/zhifu/funasr_github/test_local/aishell2_dev_ios/asr_task_debug_len.jsonl" \
-#+input="/Users/zhifu/funasr_github/test_local/aishell2_dev_ios/asr_task_debug_len_10.jsonl" \
-#+model="/Users/zhifu/modelscope_models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch" \
-
-#+model="/Users/zhifu/modelscope_models/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch" \
-#+model="/Users/zhifu/modelscope_models/speech_paraformer-large-contextual_asr_nat-zh-cn-16k-common-vocab8404" \
-#+"hotword='杈鹃瓟闄� 榄旀惌'"
-
-#+vad_model="/Users/zhifu/Downloads/modelscope_models/speech_fsmn_vad_zh-cn-16k-common-pytorch" \

--
Gitblit v1.9.1