File size: 1,119 Bytes
af38164 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
#!/usr/bin/env bash
# Please go to
# https://huggingface.co/Zengwei/icefall-asr-librispeech-conv-emformer-transducer-stateless2-2022-07-05
# to download the pre-trained models
#
# cd $dir
# ln -s icefall-asr-librispeech-conv-emformer-transducer-stateless2-2022-07-05/exp/pretrained-epoch-30-avg-10-averaged.pt epoch-30.pt
. path.sh
export CUDA_VISIBLE_DEVICES=""
set -ex
dir=./k2fsa-zipformer-chinese-english-mixed
if [ ! -f $dir/exp/epoch-99.pt ]; then
pushd $dir/exp
ln -s pretrained.pt epoch-99.pt
popd
fi
./pruned_transducer_stateless7_streaming/jit_trace_export-zh.py \
--exp-dir $dir/exp \
--lang-dir $dir/data/lang_char_bpe \
--epoch 99 \
--avg 1 \
--use-averaged-model 0 \
\
--decode-chunk-len 32 \
--num-encoder-layers "2,4,3,2,4" \
--feedforward-dims "1024,1024,1536,1536,1024" \
--nhead "8,8,8,8,8" \
--encoder-dims "384,384,384,384,384" \
--attention-dims "192,192,192,192,192" \
--encoder-unmasked-dims "256,256,256,256,256" \
--zipformer-downsampling-factors "1,2,4,8,2" \
--cnn-module-kernels "31,31,31,31,31" \
--decoder-dim 512 \
--joiner-dim 512
exit 0
|