decode.sh 781 字节
Newer Older
H
Hui Zhang 已提交
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
set -e

. path.sh

data=data
exp=exp
nj=20
mkdir -p $exp
ckpt_dir=./data/model
11
model_dir=$ckpt_dir/asr1_chunk_conformer_u2pp_wenetspeech_static_1.3.0.model/
H
Hui Zhang 已提交
12
text=$data/test/text
H
Hui Zhang 已提交
13

H
Hui Zhang 已提交
14
utils/run.pl JOB=1:$nj $data/split${nj}/JOB/decoder.log \
H
Hui Zhang 已提交
15 16 17 18 19 20 21 22 23
ctc_prefix_beam_search_decoder_main \
    --model_path=$model_dir/export.jit \
    --vocab_path=$model_dir/unit.txt \
    --nnet_decoder_chunk=16 \
    --receptive_field_length=7 \
    --subsampling_rate=4 \
    --feature_rspecifier=scp:$data/split${nj}/JOB/fbank.scp \
    --result_wspecifier=ark,t:$data/split${nj}/JOB/result_decode.ark

H
Hui Zhang 已提交
24 25 26
cat $data/split${nj}/*/result_decode.ark > $exp/aishell.decode.rsl
utils/compute-wer.py --char=1 --v=1 $text $exp/aishell.decode.rsl > $exp/aishell.decode.err
tail -n 7 $exp/aishell.decode.err