File size: 927 Bytes
138f2ef
 
 
e5d4fa6
138f2ef
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash

# Please go to
# https://huggingface.co/pfluo/k2fsa-zipformer-chinese-english-mixed
# to download the pre-trained models


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