From a96350ff4fe0b53d8544de101817881d6ff105b2 Mon Sep 17 00:00:00 2001
From: yhliang <68215459+yhliang-aslp@users.noreply.github.com>
Date: 星期五, 21 四月 2023 11:46:34 +0800
Subject: [PATCH] Merge pull request #392 from alibaba-damo-academy/main

---
 egs_modelscope/asr/TEMPLATE/infer.sh |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/egs_modelscope/asr/TEMPLATE/infer.sh b/egs_modelscope/asr/TEMPLATE/infer.sh
index b8b011c..134a8ad 100644
--- a/egs_modelscope/asr/TEMPLATE/infer.sh
+++ b/egs_modelscope/asr/TEMPLATE/infer.sh
@@ -12,7 +12,9 @@
 batch_size=64
 gpu_inference=true    # whether to perform gpu decoding
 gpuid_list="0,1"    # set gpus, e.g., gpuid_list="0,1"
-njob=4    # the number of jobs for CPU decoding, if gpu_inference=false, use CPU decoding, please set njob
+njob=64    # the number of jobs for CPU decoding, if gpu_inference=false, use CPU decoding, please set njob
+checkpoint_dir=
+checkpoint_name="valid.cer_ctc.ave.pb"
 
 . utils/parse_options.sh || exit 1;
 
@@ -34,6 +36,11 @@
 done
 perl utils/split_scp.pl ${data_dir}/wav.scp ${split_scps}
 
+if ${checkpoint_dir}; then
+  python utils/prepare_checkpoint.py ${model} ${checkpoint_dir} ${checkpoint_name}
+  model=${checkpoint_dir}/${model}
+fi
+
 if [ $stage -le 1 ] && [ $stop_stage -ge 1 ];then
     echo "Decoding ..."
     gpuid_list_array=(${gpuid_list//,/ })

--
Gitblit v1.9.1