Views
No views yet
sudo apt-get install git-lfs
git clone https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless-2022-03-12
cd icefall-asr-librispeech-pruned-transducer-stateless-2022-03-12
git lfs pullgit lfs pull. Otherwise, you will be SAD later.1603744469d167d848e074f2ea98c587153205fa.git clone https://github.com/k2-fsa/icefall
cd icefall
git checkout 1603744469d167d848e074f2ea98c587153205faicefall.cd egs/librispeech/ASR/
./prepare.sh
export CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7"
. path.sh
./pruned_transducer_stateless/train.py \
--world-size 8 \
--num-epochs 60 \
--start-epoch 0 \
--exp-dir pruned_transducer_stateless/exp \
--full-libri 1 \
--max-duration 300 \
--prune-range 5 \
--lr-factor 5 \
--lm-scale 0.251epoch=42
2avg=11
3sym=1
4
5# greedy search
6
7./pruned_transducer_stateless/decode.py \
8 --epoch $epoch \
9 --avg $avg \
10 --exp-dir ./pruned_transducer_stateless/exp \
11 --max-duration 100 \
12 --decoding-method greedy_search \
13 --beam-size 4 \
14 --max-sym-per-frame $sym
15
16# modified beam search
17./pruned_transducer_stateless/decode.py \
18 --epoch $epoch \
19 --avg $avg \
20 --exp-dir ./pruned_transducer_stateless/exp \
21 --max-duration 100 \
22 --decoding-method modified_beam_search \
23 --beam-size 4
24
25# beam search
26# (not recommended)
27./pruned_transducer_stateless/decode.py \
28 --epoch $epoch \
29 --avg $avg \
30 --exp-dir ./pruned_transducer_stateless/exp \
31 --max-duration 100 \
32 --decoding-method beam_search \
33 --beam-size 4log).| test-clean | test-other | comment | |
|---|---|---|---|
| greedy search (max sym per frame 1) | 2.62 | 6.37 | --epoch 42, --avg 11, --max-duration 100 |
| greedy search (max sym per frame 2) | 2.62 | 6.37 | --epoch 42, --avg 11, --max-duration 100 |
| greedy search (max sym per frame 3) | 2.62 | 6.37 | --epoch 42, --avg 11, --max-duration 100 |
| modified beam search (beam size 4) | 2.56 | 6.27 | --epoch 42, --avg 11, --max-duration 100 |
| beam search (beam size 4) | 2.57 | 6.27 | --epoch 42, --avg 11, --max-duration 100 |
preprained.ptexp/pretrained.pt is generated by the following command:1epoch=42
2avg=11
3
4./pruned_transducer_stateless/export.py \
5 --exp-dir ./pruned_transducer_stateless/exp \
6 --bpe-model data/lang_bpe_500/bpe.model \
7 --epoch $epoch \
8 --avg $avgpretrained.pt to compute the WER for test-clean and test-other,
just do the following:cp icefall-asr-librispeech-pruned-transducer-stateless-2022-03-12/exp/pretrained.pt \
/path/to/icefall/egs/librispeech/ASR/pruned_transducer_stateless/exp/epoch-999.pt--epoch 999 --avg 1 to pruned_transducer_stateless/decode.py.