From e68c9c0c1fcfd20d56c8e5daf793542f362b4dbf Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期三, 22 三月 2023 19:29:47 +0800
Subject: [PATCH] Merge pull request #282 from alibaba-damo-academy/dev_lzr

---
 egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/infer.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/infer.sh b/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/infer.sh
index ab64849..f080257 100644
--- a/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/infer.sh
+++ b/egs_modelscope/asr/paraformer/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/infer.sh
@@ -64,8 +64,8 @@
 if [ $stage -le 2 ] && [ $stop_stage -ge 2 ];then
     echo "Computing WER ..."
     python utils/proce_text.py ${output_dir}/1best_recog/text ${output_dir}/1best_recog/text.proc
-    python utils/proce_text.py ${data_dir}/text ${data_dir}/text.proc
-    python utils/compute_wer.py ${data_dir}/text.proc ${output_dir}/1best_recog/text.proc ${output_dir}/1best_recog/text.cer
+    python utils/proce_text.py ${data_dir}/text ${output_dir}/1best_recog/text.ref
+    python utils/compute_wer.py ${output_dir}/1best_recog/text.ref ${output_dir}/1best_recog/text.proc ${output_dir}/1best_recog/text.cer
     tail -n 3 ${output_dir}/1best_recog/text.cer
 fi
 
@@ -75,7 +75,7 @@
     ./utils/textnorm_zh.py \
         --has_key --to_upper \
         ${data_dir}/text \
-        ${data_dir}/ref.txt
+        ${output_dir}/1best_recog/ref.txt
 
     echo "$0 --> Normalizing HYP text ..."
     ./utils/textnorm_zh.py \
@@ -87,7 +87,7 @@
     echo "$0 --> computing WER/CER and alignment ..."
     ./utils/error_rate_zh \
         --tokenizer char \
-        --ref ${data_dir}/ref.txt \
+        --ref ${output_dir}/1best_recog/ref.txt \
         --hyp ${output_dir}/1best_recog/rec_non_empty.txt \
         ${output_dir}/1best_recog/DETAILS.txt | tee ${output_dir}/1best_recog/RESULTS.txt
     rm -rf ${output_dir}/1best_recog/rec.txt ${output_dir}/1best_recog/rec_non_empty.txt

--
Gitblit v1.9.1