You can use the following command to test the pretrained.py and the pretrained files:
CUDA_VISIBLE_DEVICES='1' python transducer_stateless/pretrained.py --checkpoint icefall_asr_tedlium3_transducer_stateless/exp/pretrained_average_14_to_29.pt --bpe-model icefall_asr_tedlium3_transducer_stateless/data/lang_bpe_500/bpe.model --method greedy_search icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W01.wav icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W02.wav icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W03.wav
The running results are as follows:
2022-03-03 14:59:21,847 INFO [pretrained.py:251] {'sample_rate': 16000, 'feature_dim': 80, 'encoder_out_dim': 512, 'subsampling_factor': 4, 'attention_dim': 512, 'nhead': 8, 'dim_feedforward': 2048, 'num_encoder_layers': 12, 'vgg_frontend': False, 'checkpoint': 'icefall_asr_tedlium3_transducer_stateless/exp/pretrained_average_14_to_29.pt', 'bpe_model': 'icefall_asr_tedlium3_transducer_stateless/data/lang_bpe_500/bpe.model', 'method': 'greedy_search', 'sound_files': ['icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W01.wav', 'icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W02.wav', 'icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W03.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'unk_id': 2, 'vocab_size': 500}
2022-03-03 14:59:21,920 INFO [pretrained.py:257] device: cuda:0
2022-03-03 14:59:21,920 INFO [pretrained.py:259] Creating model
2022-03-03 14:59:30,749 INFO [pretrained.py:268] Constructing Fbank computer
2022-03-03 14:59:30,750 INFO [pretrained.py:278] Reading sound files: ['icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W01.wav', 'icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W02.wav', 'icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W03.wav']
2022-03-03 14:59:30,768 INFO [pretrained.py:284] Decoding started
2022-03-03 14:59:30,908 INFO [pretrained.py:304] Using greedy_search
2022-03-03 14:59:31,757 INFO [pretrained.py:332]
icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W01.wav:
isn 't it i don 't live there but i did journey on a twenty seven thousand mile trip for two years to the fastest growing and widest counties in america what is a whitopia i define whitopia in three ways first whitopia has posted at least six percent
icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W02.wav:
population growth since two thousand secondly the majority of that growth comes from white migrants and third the whitopia has an ineffable charm a pleasant look and feel a junast qua to learn how and why whitopias are ticking i immersed myself for several months apiece in three of them first
icefall_asr_tedlium3_transducer_stateless/test_wavs/RichBenjamin_2015W03.wav:
st george utah second queurdalen idaho and third for sie county georgia first stop st george a beautiful town of red rock landscapes in the one thousand eight hundred and fifty 's brigham young dispatched families to st george to grow cotton because of the hot arid climate and so they called it utah 's dixie and the name sticks to this day
2022-03-03 14:59:31,757 INFO [pretrained.py:334] Decoding Done