diff --git a/egs_modelscope/asr/TEMPLATE/infer.sh b/egs_modelscope/asr/TEMPLATE/infer.sh index 134a8adce..ef49d7a60 100644 --- a/egs_modelscope/asr/TEMPLATE/infer.sh +++ b/egs_modelscope/asr/TEMPLATE/infer.sh @@ -36,7 +36,7 @@ for JOB in $(seq ${nj}); do done perl utils/split_scp.pl ${data_dir}/wav.scp ${split_scps} -if ${checkpoint_dir}; then +if [ -n "${checkpoint_dir}" ]; then python utils/prepare_checkpoint.py ${model} ${checkpoint_dir} ${checkpoint_name} model=${checkpoint_dir}/${model} fi diff --git a/egs_modelscope/vad/TEMPLATE/infer.sh b/egs_modelscope/vad/TEMPLATE/infer.sh index 261b5e66b..7dc03871f 100644 --- a/egs_modelscope/vad/TEMPLATE/infer.sh +++ b/egs_modelscope/vad/TEMPLATE/infer.sh @@ -36,7 +36,7 @@ for JOB in $(seq ${nj}); do done perl utils/split_scp.pl ${data_dir}/wav.scp ${split_scps} -if ${checkpoint_dir}; then +if [ -n "${checkpoint_dir}" ]; then python utils/prepare_checkpoint.py ${model} ${checkpoint_dir} ${checkpoint_name} model=${checkpoint_dir}/${model} fi