dpss-exp3-TTS / eval /cal_wer.sh
lglg666's picture
Upload folder using huggingface_hub
6766eda verified
set -x
meta_lst=$1
output_dir=$2
dataset_lst=$3
lang='zh'
wav_wav_text=$output_dir/wav_res_ref_text
score_file=$output_dir/wav_res_ref_text.wer
workdir=$(cd $(dirname $0); cd ../; pwd)
python3 get_wav_res_ref_text.py $meta_lst $output_dir $dataset_lst $wav_wav_text
python3 prepare_ckpt.py
# 单进程运行
temp_result_file=$output_dir/temp_wer_result.out
python3 run_wer.py $wav_wav_text $temp_result_file $lang
# 计算平均WER
python3 average_wer.py $temp_result_file $score_file
# 清理临时文件
rm $wav_wav_text
rm $temp_result_file