Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

infer.sh

游雁ed3e085f78c6
diff --git a/egs_modelscope/asr/TEMPLATE/infer.sh b/egs_modelscope/asr/TEMPLATE/infer.sh
index cbbe5e67f..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 -n ${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 8252fea76..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 -n ${checkpoint_dir}; then
+if [ -n "${checkpoint_dir}" ]; then
python utils/prepare_checkpoint.py ${model} ${checkpoint_dir} ${checkpoint_name}
model=${checkpoint_dir}/${model}
fi