Upload 6 files
Browse files- exp/decode.sh +11 -0
- exp/export-onnx.sh +10 -0
- exp/export.sh +10 -0
- exp/onnx_pretrained.sh +11 -0
- exp/pretrained.sh +8 -0
- exp/run.sh +22 -0
exp/decode.sh
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env bash
|
2 |
+
|
3 |
+
export CUDA_VISIBLE_DEVICES=
|
4 |
+
|
5 |
+
# greedy search
|
6 |
+
./pruned_transducer_stateless7/decode.py \
|
7 |
+
--epoch 20 \
|
8 |
+
--avg 5 \
|
9 |
+
--exp-dir ./pruned_transducer_stateless7/exp \
|
10 |
+
--max-duration 600 \
|
11 |
+
--decoding-method greedy_search
|
exp/export-onnx.sh
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env bash
|
2 |
+
|
3 |
+
export CUDA_VISIBLE_DEVICES=
|
4 |
+
|
5 |
+
./pruned_transducer_stateless7/export-onnx.py \
|
6 |
+
--bpe-model ./data/lang_bpe_500/bpe.model \
|
7 |
+
--use-averaged-model 1 \
|
8 |
+
--epoch 20 \
|
9 |
+
--avg 5 \
|
10 |
+
--exp-dir ./pruned_transducer_stateless7/exp
|
exp/export.sh
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env bash
|
2 |
+
|
3 |
+
export CUDA_VISIBLE_DEVICES=
|
4 |
+
|
5 |
+
./pruned_transducer_stateless7/export.py \
|
6 |
+
--exp-dir ./pruned_transducer_stateless7/exp \
|
7 |
+
--bpe-model data/lang_bpe_500/bpe.model \
|
8 |
+
--epoch 20 \
|
9 |
+
--avg 5 \
|
10 |
+
--jit 1
|
exp/onnx_pretrained.sh
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env bash
|
2 |
+
|
3 |
+
|
4 |
+
./pruned_transducer_stateless7/onnx_pretrained.py \
|
5 |
+
--encoder-model-filename ./pruned_transducer_stateless7/exp/encoder-epoch-9999-avg-1.onnx \
|
6 |
+
--decoder-model-filename ./pruned_transducer_stateless7/exp/decoder-epoch-9999-avg-1.onnx \
|
7 |
+
--joiner-model-filename ./pruned_transducer_stateless7/exp/joiner-epoch-9999-avg-1.onnx \
|
8 |
+
--tokens ./data/lang_bpe_500/tokens.txt \
|
9 |
+
./test_wavs/1089-134686-0001.wav \
|
10 |
+
./test_wavs/1221-135766-0001.wav \
|
11 |
+
./test_wavs/1221-135766-0002.wav
|
exp/pretrained.sh
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env bash
|
2 |
+
|
3 |
+
./pruned_transducer_stateless7/pretrained.py \
|
4 |
+
--checkpoint ./pruned_transducer_stateless7/exp/pretrained.pt \
|
5 |
+
--bpe-model ./data/lang_bpe_500/bpe.model \
|
6 |
+
--method greedy_search \
|
7 |
+
./test_wavs/1089-134686-0001.wav \
|
8 |
+
./test_wavs/1221-135766-0001.wav
|
exp/run.sh
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env bash
|
2 |
+
|
3 |
+
export CUDA_VISIBLE_DEVICES="0,1"
|
4 |
+
|
5 |
+
git lfs install
|
6 |
+
git clone https://huggingface.co/csukuangfj/icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11
|
7 |
+
|
8 |
+
./pruned_transducer_stateless7/finetune.py \
|
9 |
+
--world-size 2 \
|
10 |
+
--num-epochs 20 \
|
11 |
+
--start-epoch 1 \
|
12 |
+
--exp-dir pruned_transducer_stateless7/exp \
|
13 |
+
--subset S \
|
14 |
+
--use-fp16 1 \
|
15 |
+
--base-lr 0.005 \
|
16 |
+
--lr-epochs 100 \
|
17 |
+
--lr-batches 100000 \
|
18 |
+
--bpe-model icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11/data/lang_bpe_500/bpe.model \
|
19 |
+
--do-finetune 1 \
|
20 |
+
--use-mux 1 \
|
21 |
+
--finetune-ckpt icefall-asr-librispeech-pruned-transducer-stateless7-2022-11-11/exp/pretrained.pt \
|
22 |
+
--max-duration 500
|