File size: 1,903 Bytes
0a3b2c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash

set -x

K2_ROOT=/ceph-hw/kangwei/code/k2_release/k2
ICEFALL=/star-kw/kangwei/code/icefall_wenetspeech

export PYTHONPATH=$K2_ROOT/k2/python:$PYTHONPATH
export PYTHONPATH=$K2_ROOT/build/lib:$PYTHONPATH
export PYTHONPATH=$ICEFALL:$PYTHONPATH

export CUDA_VISIBLE_DEVICES="4"

./zipformer/onnx_pretrained.py \
  --encoder-model-filename zipformer/exp_L_context_2/encoder-epoch-12-avg-4.onnx \
  --decoder-model-filename zipformer/exp_L_context_2/decoder-epoch-12-avg-4.onnx \
  --joiner-model-filename zipformer/exp_L_context_2/joiner-epoch-12-avg-4.onnx \
  --tokens data/lang_char/tokens.txt \
  /ceph-kw/kangwei/code/pretrained/icefall_asr_wenetspeech_pruned_transducer_stateless2/test_wavs/DEV_T0000000000.wav \
  /ceph-kw/kangwei/code/pretrained/icefall_asr_wenetspeech_pruned_transducer_stateless2/test_wavs/DEV_T0000000001.wav \
  /ceph-kw/kangwei/code/pretrained/icefall_asr_wenetspeech_pruned_transducer_stateless2/test_wavs/DEV_T0000000002.wav


./zipformer/jit_pretrained.py \
  --nn-model-filename ./zipformer/exp_L_context_2/jit_script.pt \
  /ceph-kw/kangwei/code/pretrained/icefall_asr_wenetspeech_pruned_transducer_stateless2/test_wavs/DEV_T0000000000.wav \
  /ceph-kw/kangwei/code/pretrained/icefall_asr_wenetspeech_pruned_transducer_stateless2/test_wavs/DEV_T0000000001.wav \
  /ceph-kw/kangwei/code/pretrained/icefall_asr_wenetspeech_pruned_transducer_stateless2/test_wavs/DEV_T0000000002.wav


./zipformer/pretrained.py \
  --checkpoint zipformer/exp_L_context_2/pretrained.pt \
  --method greedy_search \
  /ceph-kw/kangwei/code/pretrained/icefall_asr_wenetspeech_pruned_transducer_stateless2/test_wavs/DEV_T0000000000.wav \
  /ceph-kw/kangwei/code/pretrained/icefall_asr_wenetspeech_pruned_transducer_stateless2/test_wavs/DEV_T0000000001.wav \
  /ceph-kw/kangwei/code/pretrained/icefall_asr_wenetspeech_pruned_transducer_stateless2/test_wavs/DEV_T0000000002.wav