| | |
| | | ckpt_id=$1 |
| | | device=$2 |
| | | |
| | | for data_set in "librispeech_test_clean_speech2text.jsonl" "librispeech_test_other_speech2text.jsonl"; do |
| | | jsonl=${jsonl_dir}/${data_set} |
| | | output_dir=${out_dir}/${data_set} |
| | | mkdir -p ${output_dir} |
| | | pred_file=${output_dir}/1best_recog/text_tn |
| | | ref_file=${output_dir}/1best_recog/label |
| | | |
| | | python ./demo_speech2text.py ${ckpt_dir} ${ckpt_id} ${jsonl} ${output_dir} ${device} |
| | | |
| | | python /mnt/workspace/zhifu.gzf/codebase/FunASR/funasr/metrics/wer.py ++ref_file=${ref_file} ++hyp_file=${pred_file} ++cer_file=${pred_file}.cer ++cn_postprocess=false |
| | | |
| | | done |
| | | #for data_set in "librispeech_test_clean_speech2text.jsonl" "librispeech_test_other_speech2text.jsonl"; do |
| | | # jsonl=${jsonl_dir}/${data_set} |
| | | # output_dir=${out_dir}/${data_set} |
| | | # mkdir -p ${output_dir} |
| | | # pred_file=${output_dir}/1best_recog/text_tn |
| | | # ref_file=${output_dir}/1best_recog/label |
| | | # |
| | | # python ./demo_speech2text.py ${ckpt_dir} ${ckpt_id} ${jsonl} ${output_dir} ${device} |
| | | # |
| | | # python /mnt/workspace/zhifu.gzf/codebase/FunASR/funasr/metrics/wer.py ++ref_file=${ref_file} ++hyp_file=${pred_file} ++cer_file=${pred_file}.cer ++cn_postprocess=false |
| | | # |
| | | #done |
| | | |
| | | |
| | | for data_set in "aishell1_test_speech2text.jsonl" "aishell2_ios_test_speech2text.jsonl" "librispeech_test_other_speech2text.jsonl"; do |