You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PaddleSpeech/runtime/examples/u2pp_ol/wenetspeech/local/recognizer.sh

37 lines
1.1 KiB

2 years ago
#!/bin/bash
set -e
data=data
exp=exp
2 years ago
nj=20
2 years ago
. utils/parse_options.sh
2 years ago
2 years ago
mkdir -p $exp
ckpt_dir=./data/model
model_dir=$ckpt_dir/asr1_chunk_conformer_u2pp_wenetspeech_static_1.3.0.model/
2 years ago
aishell_wav_scp=aishell_test.scp
2 years ago
text=$data/test/text
2 years ago
./local/split_data.sh $data $data/$aishell_wav_scp $aishell_wav_scp $nj
utils/run.pl JOB=1:$nj $data/split${nj}/JOB/recognizer.log \
u2_recognizer_main \
--use_fbank=true \
--num_bins=80 \
--cmvn_file=$model_dir/mean_std.json \
2 years ago
--model_path=$model_dir/export.jit \
--vocab_path=$model_dir/unit.txt \
--nnet_decoder_chunk=16 \
--receptive_field_length=7 \
--subsampling_rate=4 \
--wav_rspecifier=scp:$data/split${nj}/JOB/${aishell_wav_scp} \
--result_wspecifier=ark,t:$data/split${nj}/JOB/result_recognizer.ark
2 years ago
cat $data/split${nj}/*/result_recognizer.ark > $exp/aishell_recognizer
utils/compute-wer.py --char=1 --v=1 $text $exp/aishell_recognizer > $exp/aishell.recognizer.err
2 years ago
echo "recognizer test have finished!!!"
2 years ago
echo "please checkout in $exp/aishell.recognizer.err"
2 years ago
tail -n 7 $exp/aishell.recognizer.err