#!/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