From 51f51f958cbc812af3b04f22b0cbdd65257d6ad9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 10 Oct 2022 11:39:38 +0800 Subject: [PATCH 01/20] update docs --- .idea/.gitignore | 8 ++ .idea/icefall.iml | 15 ++ .idea/inspectionProfiles/Project_Default.xml | 27 ++++ .../inspectionProfiles/profiles_settings.xml | 6 + .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 + docs/source/recipes/aishell/conformer_ctc.rst | 20 +-- .../recipes/aishell/stateless_transducer.rst | 60 ++++---- docs/source/recipes/aishell/tdnn_lstm_ctc.rst | 8 +- .../recipes/librispeech/conformer_ctc.rst | 128 +++++++++--------- .../recipes/librispeech/tdnn_lstm_ctc.rst | 38 +++--- docs/source/recipes/timit/tdnn_ligru_ctc.rst | 2 +- docs/source/recipes/timit/tdnn_lstm_ctc.rst | 2 +- 13 files changed, 199 insertions(+), 129 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/icefall.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000..13566b81b0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/icefall.iml b/.idea/icefall.iml new file mode 100644 index 0000000000..3ed51aeda3 --- /dev/null +++ b/.idea/icefall.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000000..8877b1a06d --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,27 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000000..105ce2da2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..b33405972e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..94a25f7f4c --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/docs/source/recipes/aishell/conformer_ctc.rst b/docs/source/recipes/aishell/conformer_ctc.rst index 75a2a8eca3..72690e102d 100644 --- a/docs/source/recipes/aishell/conformer_ctc.rst +++ b/docs/source/recipes/aishell/conformer_ctc.rst @@ -422,7 +422,7 @@ The information of the test sound files is listed below: .. code-block:: bash - $ soxi tmp/icefall_asr_aishell_conformer_ctc/test_wavs/*.wav + $ soxi tmp/icefall_asr_aishell_conformer_ctc/test_waves/*.wav Input File : 'tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0121.wav' Channels : 1 @@ -485,9 +485,9 @@ The command to run CTC decoding is: --checkpoint ./tmp/icefall_asr_aishell_conformer_ctc/exp/pretrained.pt \ --tokens-file ./tmp/icefall_asr_aishell_conformer_ctc/data/lang_char/tokens.txt \ --method ctc-decoding \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0123.wav The output is given below: @@ -529,9 +529,9 @@ The command to run HLG decoding is: --words-file ./tmp/icefall_asr_aishell_conformer_ctc/data/lang_char/words.txt \ --HLG ./tmp/icefall_asr_aishell_conformer_ctc/data/lang_char/HLG.pt \ --method 1best \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0123.wav The output is given below: @@ -575,9 +575,9 @@ The command to run HLG decoding + attention decoder rescoring is: --words-file ./tmp/icefall_asr_aishell_conformer_ctc/data/lang_char/words.txt \ --HLG ./tmp/icefall_asr_aishell_conformer_ctc/data/lang_char/HLG.pt \ --method attention-decoder \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0123.wav The output is below: diff --git a/docs/source/recipes/aishell/stateless_transducer.rst b/docs/source/recipes/aishell/stateless_transducer.rst index e8137b8c12..eb87af916d 100644 --- a/docs/source/recipes/aishell/stateless_transducer.rst +++ b/docs/source/recipes/aishell/stateless_transducer.rst @@ -481,7 +481,7 @@ After downloading, you will have the following files: | |-- log-decode-epoch-64-avg-33-context-2-max-sym-per-frame-1-2022-02-28-18-13-07 | |-- recogs-test-beam_4-epoch-64-avg-33-beam-4.txt | `-- recogs-test-greedy_search-epoch-64-avg-33-context-2-max-sym-per-frame-1.txt - `-- test_wavs + `-- test_waves |-- BAC009S0764W0121.wav |-- BAC009S0764W0122.wav |-- BAC009S0764W0123.wav @@ -506,7 +506,7 @@ After downloading, you will have the following files: It contains decoding logs and decoded results. - - ``test_wavs`` + - ``test_waves`` It contains some test sound files from Aishell ``test`` dataset. @@ -514,9 +514,9 @@ The information of the test sound files is listed below: .. code-block:: bash - $ soxi tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/*.wav + $ soxi tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/*.wav - Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav' + Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -526,7 +526,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav' + Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -536,7 +536,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav' + Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -583,9 +583,9 @@ The command to run greedy search is given below: --checkpoint ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt \ --lang-dir ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char \ --method greedy_search \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav The output is as follows: @@ -593,21 +593,21 @@ The output is as follows: 2022-03-03 15:35:26,531 INFO [pretrained.py:239] device: cuda:0 2022-03-03 15:35:26,994 INFO [lexicon.py:176] Loading pre-compiled tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char/Linv.pt - 2022-03-03 15:35:27,027 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'greedy_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} + 2022-03-03 15:35:27,027 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'greedy_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} 2022-03-03 15:35:27,027 INFO [pretrained.py:248] About to create model 2022-03-03 15:35:36,878 INFO [pretrained.py:257] Constructing Fbank computer - 2022-03-03 15:35:36,880 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'] + 2022-03-03 15:35:36,880 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'] 2022-03-03 15:35:36,891 INFO [pretrained.py:273] Decoding started /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/conformer.py:113: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). lengths = ((x_lens - 1) // 2 - 1) // 2 2022-03-03 15:35:37,163 INFO [pretrained.py:320] - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav: 甚 至 出 现 交 易 几 乎 停 滞 的 情 况 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav: 一 二 线 城 市 虽 然 也 处 于 调 整 中 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav: 但 因 为 聚 集 了 过 多 公 共 资 源 2022-03-03 15:35:37,163 INFO [pretrained.py:322] Decoding Done @@ -627,9 +627,9 @@ The command to run beam search is given below: --lang-dir ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char \ --method beam_search \ --beam-size 4 \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav The output is as follows: @@ -637,21 +637,21 @@ The output is as follows: 2022-03-03 15:39:09,285 INFO [pretrained.py:239] device: cuda:0 2022-03-03 15:39:09,708 INFO [lexicon.py:176] Loading pre-compiled tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char/Linv.pt - 2022-03-03 15:39:09,759 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} + 2022-03-03 15:39:09,759 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} 2022-03-03 15:39:09,760 INFO [pretrained.py:248] About to create model 2022-03-03 15:39:18,919 INFO [pretrained.py:257] Constructing Fbank computer - 2022-03-03 15:39:18,922 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'] + 2022-03-03 15:39:18,922 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'] 2022-03-03 15:39:18,929 INFO [pretrained.py:273] Decoding started /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/conformer.py:113: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). lengths = ((x_lens - 1) // 2 - 1) // 2 2022-03-03 15:39:21,046 INFO [pretrained.py:320] - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav: 甚 至 出 现 交 易 几 乎 停 滞 的 情 况 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav: 一 二 线 城 市 虽 然 也 处 于 调 整 中 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav: 但 因 为 聚 集 了 过 多 公 共 资 源 2022-03-03 15:39:21,047 INFO [pretrained.py:322] Decoding Done @@ -671,9 +671,9 @@ The command to run modified beam search is given below: --lang-dir ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char \ --method modified_beam_search \ --beam-size 4 \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav The output is as follows: @@ -681,23 +681,23 @@ The output is as follows: 2022-03-03 15:41:23,319 INFO [pretrained.py:239] device: cuda:0 2022-03-03 15:41:23,798 INFO [lexicon.py:176] Loading pre-compiled tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char/Linv.pt - 2022-03-03 15:41:23,831 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'modified_beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} + 2022-03-03 15:41:23,831 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'modified_beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} 2022-03-03 15:41:23,831 INFO [pretrained.py:248] About to create model 2022-03-03 15:41:32,214 INFO [pretrained.py:257] Constructing Fbank computer - 2022-03-03 15:41:32,215 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'] + 2022-03-03 15:41:32,215 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'] 2022-03-03 15:41:32,220 INFO [pretrained.py:273] Decoding started /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/conformer.py:113: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). lengths = ((x_lens - 1) // 2 - 1) // 2 /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/beam_search.py:402: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). topk_hyp_indexes = topk_indexes // logits.size(-1) 2022-03-03 15:41:32,583 INFO [pretrained.py:320] - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav: 甚 至 出 现 交 易 几 乎 停 滞 的 情 况 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav: 一 二 线 城 市 虽 然 也 处 于 调 整 中 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav: 但 因 为 聚 集 了 过 多 公 共 资 源 2022-03-03 15:41:32,583 INFO [pretrained.py:322] Decoding Done diff --git a/docs/source/recipes/aishell/tdnn_lstm_ctc.rst b/docs/source/recipes/aishell/tdnn_lstm_ctc.rst index e9b0ea6561..2759316985 100644 --- a/docs/source/recipes/aishell/tdnn_lstm_ctc.rst +++ b/docs/source/recipes/aishell/tdnn_lstm_ctc.rst @@ -402,7 +402,7 @@ The information of the test sound files is listed below: .. code-block:: bash - $ soxi tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_wavs/*.wav + $ soxi tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_waves/*.wav Input File : 'tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_waves/BAC009S0764W0121.wav' Channels : 1 @@ -461,9 +461,9 @@ The command to run HLG decoding is: --words-file ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/data/lang_phone/words.txt \ --HLG ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/data/lang_phone/HLG.pt \ --method 1best \ - ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_waves/BAC009S0764W0123.wav The output is given below: diff --git a/docs/source/recipes/librispeech/conformer_ctc.rst b/docs/source/recipes/librispeech/conformer_ctc.rst index 4656acfd64..3be776fc5d 100644 --- a/docs/source/recipes/librispeech/conformer_ctc.rst +++ b/docs/source/recipes/librispeech/conformer_ctc.rst @@ -465,7 +465,7 @@ After downloading, you will have the following files: | `-- pretrained.pt |-- log | `-- log-decode-2021-11-09-17-38-28 - `-- test_wavs + `-- test_waves |-- 1089-134686-0001.wav |-- 1221-135766-0001.wav |-- 1221-135766-0002.wav @@ -508,21 +508,21 @@ After downloading, you will have the following files: It contains torch scripted model that can be deployed in C++. - - ``test_wavs/*.wav`` + - ``test_waves/*.wav`` It contains some test sound files from LibriSpeech ``test-clean`` dataset. - - ``test_wavs/trans.txt`` + - ``test_waves/trans.txt`` - It contains the reference transcripts for the sound files in ``test_wavs/``. + It contains the reference transcripts for the sound files in ``test_waves/``. The information of the test sound files is listed below: .. code-block:: bash - $ soxi icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/*.wav + $ soxi icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/*.wav - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav' + Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -532,7 +532,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav' + Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -542,7 +542,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav' + Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -586,30 +586,30 @@ The command to run CTC decoding is: --bpe-model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model \ --method ctc-decoding \ --num-classes 500 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is given below: .. code-block:: - 2021-11-10 12:12:29,554 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': None, 'HLG': None, 'bpe_model': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model', 'method': 'ctc-decoding', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 12:12:29,554 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': None, 'HLG': None, 'bpe_model': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model', 'method': 'ctc-decoding', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 12:12:29,554 INFO [pretrained.py:266] device: cuda:0 2021-11-10 12:12:29,554 INFO [pretrained.py:268] Creating model 2021-11-10 12:12:35,600 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 12:12:35,601 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] + 2021-11-10 12:12:35,601 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] 2021-11-10 12:12:35,758 INFO [pretrained.py:301] Decoding started 2021-11-10 12:12:36,025 INFO [pretrained.py:319] Use CTC decoding 2021-11-10 12:12:36,204 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROFFELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED B OSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 12:12:36,204 INFO [pretrained.py:427] Decoding Done @@ -630,30 +630,30 @@ The command to run HLG decoding is: --method 1best \ --num-classes 500 \ --HLG ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is given below: .. code-block:: - 2021-11-10 13:33:03,723 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': '1best', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 13:33:03,723 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': '1best', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 13:33:03,723 INFO [pretrained.py:266] device: cuda:0 2021-11-10 13:33:03,723 INFO [pretrained.py:268] Creating model 2021-11-10 13:33:09,775 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:33:09,776 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] + 2021-11-10 13:33:09,776 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] 2021-11-10 13:33:09,881 INFO [pretrained.py:301] Decoding started 2021-11-10 13:33:09,951 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt 2021-11-10 13:33:13,234 INFO [pretrained.py:384] Use HLG decoding 2021-11-10 13:33:13,571 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 13:33:13,571 INFO [pretrained.py:427] Decoding Done @@ -678,31 +678,31 @@ The command to run HLG decoding + LM rescoring is: --HLG ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ --G ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt \ --ngram-lm-scale 1.0 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav Its output is: .. code-block:: - 2021-11-10 13:39:55,857 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'whole-lattice-rescoring', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 1.0, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-$it-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 13:39:55,857 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'whole-lattice-rescoring', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 1.0, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-$it-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 13:39:55,858 INFO [pretrained.py:266] device: cuda:0 2021-11-10 13:39:55,858 INFO [pretrained.py:268] Creating model 2021-11-10 13:40:01,979 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:40:01,980 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] + 2021-11-10 13:40:01,980 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] 2021-11-10 13:40:02,055 INFO [pretrained.py:301] Decoding started 2021-11-10 13:40:02,117 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt 2021-11-10 13:40:05,051 INFO [pretrained.py:363] Loading G from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt 2021-11-10 13:40:18,959 INFO [pretrained.py:389] Use HLG decoding + LM rescoring 2021-11-10 13:40:19,546 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 13:40:19,546 INFO [pretrained.py:427] Decoding Done @@ -733,31 +733,31 @@ The command to run HLG decoding + LM rescoring + attention decoder rescoring is: --num-paths 100 \ --sos-id 1 \ --eos-id 1 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is below: .. code-block:: - 2021-11-10 13:43:45,598 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 6, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'attention-decoder', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 2.0, 'attention_decoder_scale': 2.0, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 13:43:45,598 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 6, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'attention-decoder', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 2.0, 'attention_decoder_scale': 2.0, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 13:43:45,599 INFO [pretrained.py:266] device: cuda:0 2021-11-10 13:43:45,599 INFO [pretrained.py:268] Creating model 2021-11-10 13:43:51,833 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:43:51,834 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] + 2021-11-10 13:43:51,834 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] 2021-11-10 13:43:51,915 INFO [pretrained.py:301] Decoding started 2021-11-10 13:43:52,076 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt 2021-11-10 13:43:55,110 INFO [pretrained.py:363] Loading G from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt 2021-11-10 13:44:09,329 INFO [pretrained.py:397] Use HLG + LM rescoring + attention decoder rescoring 2021-11-10 13:44:10,192 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 13:44:10,192 INFO [pretrained.py:427] Decoding Done @@ -896,9 +896,9 @@ CTC decoding --use_gpu true \ --nn_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/cpu_jit.pt \ --bpe_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav Its output is: @@ -916,13 +916,13 @@ Its output is: 2021-11-10 13:58:02.708 [I] k2/torch/bin/ctc_decode.cu:207:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROFFELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION HLG decoding @@ -935,9 +935,9 @@ HLG decoding --nn_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/cpu_jit.pt \ --hlg ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is: @@ -955,13 +955,13 @@ The output is: 2021-11-10 13:59:13.268 [I] k2/torch/bin/hlg_decode.cu:216:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION @@ -977,9 +977,9 @@ HLG decoding + n-gram LM rescoring --g ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt \ --ngram_lm_scale 1.0 \ --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is: @@ -1001,13 +1001,13 @@ The output is: 2021-11-10 14:01:08.68 [I] k2/torch/bin/ngram_lm_rescore.cu:242:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION @@ -1028,9 +1028,9 @@ HLG decoding + n-gram LM rescoring + attention decoder rescoring --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ --sos_id 1 \ --eos_id 1 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is: @@ -1054,13 +1054,13 @@ The output is: 2021-11-10 14:02:57.179 [I] k2/torch/bin/attention_rescore.cu:369:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION There is a Colab notebook showing you how to run a torch scripted model in C++. diff --git a/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst b/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst index ca477fbaa3..39541f281d 100644 --- a/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst +++ b/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst @@ -224,7 +224,7 @@ After downloading, you will have the following files: | `-- G_4_gram.pt |-- exp | `-- pretrained.pt - `-- test_wavs + `-- test_waves |-- 1089-134686-0001.flac |-- 1221-135766-0001.flac |-- 1221-135766-0002.flac @@ -268,9 +268,9 @@ The information of the test sound files is listed below: .. code-block:: bash - $ soxi tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/*.flac + $ soxi tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/*.flac - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac' + Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -280,7 +280,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit FLAC - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac' + Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -290,7 +290,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit FLAC - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac' + Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -320,9 +320,9 @@ To decode with ``1best`` method, we can use: --checkpoint ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/exp/pretraind.pt \ --words-file ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/words.txt \ --HLG ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac The output is: @@ -332,17 +332,17 @@ The output is: 2021-08-24 16:57:13,315 INFO [pretrained.py:170] Creating model 2021-08-24 16:57:18,331 INFO [pretrained.py:182] Loading HLG from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt 2021-08-24 16:57:27,581 INFO [pretrained.py:199] Constructing Fbank computer - 2021-08-24 16:57:27,584 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac'] + 2021-08-24 16:57:27,584 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac'] 2021-08-24 16:57:27,599 INFO [pretrained.py:215] Decoding started 2021-08-24 16:57:27,791 INFO [pretrained.py:245] Use HLG decoding 2021-08-24 16:57:28,098 INFO [pretrained.py:266] - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION @@ -360,9 +360,9 @@ To decode with ``whole-lattice-rescoring`` methond, you can use --method whole-lattice-rescoring \ --G ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lm/G_4_gram.pt \ --ngram-lm-scale 0.8 \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac The decoding output is: @@ -373,17 +373,17 @@ The decoding output is: 2021-08-24 16:39:29,403 INFO [pretrained.py:182] Loading HLG from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt 2021-08-24 16:39:40,631 INFO [pretrained.py:190] Loading G from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lm/G_4_gram.pt 2021-08-24 16:39:53,098 INFO [pretrained.py:199] Constructing Fbank computer - 2021-08-24 16:39:53,107 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac'] + 2021-08-24 16:39:53,107 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac'] 2021-08-24 16:39:53,121 INFO [pretrained.py:215] Decoding started 2021-08-24 16:39:53,443 INFO [pretrained.py:250] Use HLG decoding + LM rescoring 2021-08-24 16:39:54,010 INFO [pretrained.py:266] - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION diff --git a/docs/source/recipes/timit/tdnn_ligru_ctc.rst b/docs/source/recipes/timit/tdnn_ligru_ctc.rst index 186420ee7c..a553a4df72 100644 --- a/docs/source/recipes/timit/tdnn_ligru_ctc.rst +++ b/docs/source/recipes/timit/tdnn_ligru_ctc.rst @@ -222,7 +222,7 @@ After downloading, you will have the following files: | `-- G_4_gram.pt |-- exp | `-- pretrained_average_9_25.pt - `-- test_wavs + `-- test_waves |-- FDHC0_SI1559.WAV |-- FELC0_SI756.WAV |-- FMGD0_SI1564.WAV diff --git a/docs/source/recipes/timit/tdnn_lstm_ctc.rst b/docs/source/recipes/timit/tdnn_lstm_ctc.rst index 6f760a9ce6..4abaddeca5 100644 --- a/docs/source/recipes/timit/tdnn_lstm_ctc.rst +++ b/docs/source/recipes/timit/tdnn_lstm_ctc.rst @@ -220,7 +220,7 @@ After downloading, you will have the following files: | `-- G_4_gram.pt |-- exp | `-- pretrained_average_16_25.pt - `-- test_wavs + `-- test_waves |-- FDHC0_SI1559.WAV |-- FELC0_SI756.WAV |-- FMGD0_SI1564.WAV From da9dbcb0daef449595472d4df93b1e57408bd852 Mon Sep 17 00:00:00 2001 From: KajiMaCN Date: Mon, 10 Oct 2022 13:35:20 +0800 Subject: [PATCH 02/20] update docs --- .idea/.gitignore | 8 ++ .idea/icefall.iml | 15 ++ .idea/inspectionProfiles/Project_Default.xml | 27 ++++ .../inspectionProfiles/profiles_settings.xml | 6 + .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 + docs/source/recipes/aishell/conformer_ctc.rst | 20 +-- .../recipes/aishell/stateless_transducer.rst | 60 ++++---- docs/source/recipes/aishell/tdnn_lstm_ctc.rst | 8 +- .../recipes/librispeech/conformer_ctc.rst | 128 +++++++++--------- .../recipes/librispeech/tdnn_lstm_ctc.rst | 38 +++--- docs/source/recipes/timit/tdnn_ligru_ctc.rst | 2 +- docs/source/recipes/timit/tdnn_lstm_ctc.rst | 2 +- 13 files changed, 199 insertions(+), 129 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/icefall.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000000..13566b81b0 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/icefall.iml b/.idea/icefall.iml new file mode 100644 index 0000000000..3ed51aeda3 --- /dev/null +++ b/.idea/icefall.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000000..8877b1a06d --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,27 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000000..105ce2da2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000000..b33405972e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..94a25f7f4c --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/docs/source/recipes/aishell/conformer_ctc.rst b/docs/source/recipes/aishell/conformer_ctc.rst index 75a2a8eca3..72690e102d 100644 --- a/docs/source/recipes/aishell/conformer_ctc.rst +++ b/docs/source/recipes/aishell/conformer_ctc.rst @@ -422,7 +422,7 @@ The information of the test sound files is listed below: .. code-block:: bash - $ soxi tmp/icefall_asr_aishell_conformer_ctc/test_wavs/*.wav + $ soxi tmp/icefall_asr_aishell_conformer_ctc/test_waves/*.wav Input File : 'tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0121.wav' Channels : 1 @@ -485,9 +485,9 @@ The command to run CTC decoding is: --checkpoint ./tmp/icefall_asr_aishell_conformer_ctc/exp/pretrained.pt \ --tokens-file ./tmp/icefall_asr_aishell_conformer_ctc/data/lang_char/tokens.txt \ --method ctc-decoding \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0123.wav The output is given below: @@ -529,9 +529,9 @@ The command to run HLG decoding is: --words-file ./tmp/icefall_asr_aishell_conformer_ctc/data/lang_char/words.txt \ --HLG ./tmp/icefall_asr_aishell_conformer_ctc/data/lang_char/HLG.pt \ --method 1best \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0123.wav The output is given below: @@ -575,9 +575,9 @@ The command to run HLG decoding + attention decoder rescoring is: --words-file ./tmp/icefall_asr_aishell_conformer_ctc/data/lang_char/words.txt \ --HLG ./tmp/icefall_asr_aishell_conformer_ctc/data/lang_char/HLG.pt \ --method attention-decoder \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall_asr_aishell_conformer_ctc/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall_asr_aishell_conformer_ctc/test_waves/BAC009S0764W0123.wav The output is below: diff --git a/docs/source/recipes/aishell/stateless_transducer.rst b/docs/source/recipes/aishell/stateless_transducer.rst index e8137b8c12..eb87af916d 100644 --- a/docs/source/recipes/aishell/stateless_transducer.rst +++ b/docs/source/recipes/aishell/stateless_transducer.rst @@ -481,7 +481,7 @@ After downloading, you will have the following files: | |-- log-decode-epoch-64-avg-33-context-2-max-sym-per-frame-1-2022-02-28-18-13-07 | |-- recogs-test-beam_4-epoch-64-avg-33-beam-4.txt | `-- recogs-test-greedy_search-epoch-64-avg-33-context-2-max-sym-per-frame-1.txt - `-- test_wavs + `-- test_waves |-- BAC009S0764W0121.wav |-- BAC009S0764W0122.wav |-- BAC009S0764W0123.wav @@ -506,7 +506,7 @@ After downloading, you will have the following files: It contains decoding logs and decoded results. - - ``test_wavs`` + - ``test_waves`` It contains some test sound files from Aishell ``test`` dataset. @@ -514,9 +514,9 @@ The information of the test sound files is listed below: .. code-block:: bash - $ soxi tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/*.wav + $ soxi tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/*.wav - Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav' + Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -526,7 +526,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav' + Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -536,7 +536,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav' + Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -583,9 +583,9 @@ The command to run greedy search is given below: --checkpoint ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt \ --lang-dir ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char \ --method greedy_search \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav The output is as follows: @@ -593,21 +593,21 @@ The output is as follows: 2022-03-03 15:35:26,531 INFO [pretrained.py:239] device: cuda:0 2022-03-03 15:35:26,994 INFO [lexicon.py:176] Loading pre-compiled tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char/Linv.pt - 2022-03-03 15:35:27,027 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'greedy_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} + 2022-03-03 15:35:27,027 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'greedy_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} 2022-03-03 15:35:27,027 INFO [pretrained.py:248] About to create model 2022-03-03 15:35:36,878 INFO [pretrained.py:257] Constructing Fbank computer - 2022-03-03 15:35:36,880 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'] + 2022-03-03 15:35:36,880 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'] 2022-03-03 15:35:36,891 INFO [pretrained.py:273] Decoding started /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/conformer.py:113: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). lengths = ((x_lens - 1) // 2 - 1) // 2 2022-03-03 15:35:37,163 INFO [pretrained.py:320] - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav: 甚 至 出 现 交 易 几 乎 停 滞 的 情 况 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav: 一 二 线 城 市 虽 然 也 处 于 调 整 中 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav: 但 因 为 聚 集 了 过 多 公 共 资 源 2022-03-03 15:35:37,163 INFO [pretrained.py:322] Decoding Done @@ -627,9 +627,9 @@ The command to run beam search is given below: --lang-dir ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char \ --method beam_search \ --beam-size 4 \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav The output is as follows: @@ -637,21 +637,21 @@ The output is as follows: 2022-03-03 15:39:09,285 INFO [pretrained.py:239] device: cuda:0 2022-03-03 15:39:09,708 INFO [lexicon.py:176] Loading pre-compiled tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char/Linv.pt - 2022-03-03 15:39:09,759 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} + 2022-03-03 15:39:09,759 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} 2022-03-03 15:39:09,760 INFO [pretrained.py:248] About to create model 2022-03-03 15:39:18,919 INFO [pretrained.py:257] Constructing Fbank computer - 2022-03-03 15:39:18,922 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'] + 2022-03-03 15:39:18,922 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'] 2022-03-03 15:39:18,929 INFO [pretrained.py:273] Decoding started /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/conformer.py:113: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). lengths = ((x_lens - 1) // 2 - 1) // 2 2022-03-03 15:39:21,046 INFO [pretrained.py:320] - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav: 甚 至 出 现 交 易 几 乎 停 滞 的 情 况 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav: 一 二 线 城 市 虽 然 也 处 于 调 整 中 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav: 但 因 为 聚 集 了 过 多 公 共 资 源 2022-03-03 15:39:21,047 INFO [pretrained.py:322] Decoding Done @@ -671,9 +671,9 @@ The command to run modified beam search is given below: --lang-dir ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char \ --method modified_beam_search \ --beam-size 4 \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav The output is as follows: @@ -681,23 +681,23 @@ The output is as follows: 2022-03-03 15:41:23,319 INFO [pretrained.py:239] device: cuda:0 2022-03-03 15:41:23,798 INFO [lexicon.py:176] Loading pre-compiled tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char/Linv.pt - 2022-03-03 15:41:23,831 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'modified_beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} + 2022-03-03 15:41:23,831 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'modified_beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} 2022-03-03 15:41:23,831 INFO [pretrained.py:248] About to create model 2022-03-03 15:41:32,214 INFO [pretrained.py:257] Constructing Fbank computer - 2022-03-03 15:41:32,215 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'] + 2022-03-03 15:41:32,215 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'] 2022-03-03 15:41:32,220 INFO [pretrained.py:273] Decoding started /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/conformer.py:113: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). lengths = ((x_lens - 1) // 2 - 1) // 2 /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/beam_search.py:402: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). topk_hyp_indexes = topk_indexes // logits.size(-1) 2022-03-03 15:41:32,583 INFO [pretrained.py:320] - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav: 甚 至 出 现 交 易 几 乎 停 滞 的 情 况 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav: 一 二 线 城 市 虽 然 也 处 于 调 整 中 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav: 但 因 为 聚 集 了 过 多 公 共 资 源 2022-03-03 15:41:32,583 INFO [pretrained.py:322] Decoding Done diff --git a/docs/source/recipes/aishell/tdnn_lstm_ctc.rst b/docs/source/recipes/aishell/tdnn_lstm_ctc.rst index e9b0ea6561..2759316985 100644 --- a/docs/source/recipes/aishell/tdnn_lstm_ctc.rst +++ b/docs/source/recipes/aishell/tdnn_lstm_ctc.rst @@ -402,7 +402,7 @@ The information of the test sound files is listed below: .. code-block:: bash - $ soxi tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_wavs/*.wav + $ soxi tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_waves/*.wav Input File : 'tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_waves/BAC009S0764W0121.wav' Channels : 1 @@ -461,9 +461,9 @@ The command to run HLG decoding is: --words-file ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/data/lang_phone/words.txt \ --HLG ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/data/lang_phone/HLG.pt \ --method 1best \ - ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_wavs/BAC009S0764W0121.wav \ - ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_wavs/BAC009S0764W0122.wav \ - ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_wavs/BAC009S0764W0123.wav + ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_waves/BAC009S0764W0121.wav \ + ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_waves/BAC009S0764W0122.wav \ + ./tmp/icefall_asr_aishell_tdnn_lstm_ctc/test_waves/BAC009S0764W0123.wav The output is given below: diff --git a/docs/source/recipes/librispeech/conformer_ctc.rst b/docs/source/recipes/librispeech/conformer_ctc.rst index 4656acfd64..3be776fc5d 100644 --- a/docs/source/recipes/librispeech/conformer_ctc.rst +++ b/docs/source/recipes/librispeech/conformer_ctc.rst @@ -465,7 +465,7 @@ After downloading, you will have the following files: | `-- pretrained.pt |-- log | `-- log-decode-2021-11-09-17-38-28 - `-- test_wavs + `-- test_waves |-- 1089-134686-0001.wav |-- 1221-135766-0001.wav |-- 1221-135766-0002.wav @@ -508,21 +508,21 @@ After downloading, you will have the following files: It contains torch scripted model that can be deployed in C++. - - ``test_wavs/*.wav`` + - ``test_waves/*.wav`` It contains some test sound files from LibriSpeech ``test-clean`` dataset. - - ``test_wavs/trans.txt`` + - ``test_waves/trans.txt`` - It contains the reference transcripts for the sound files in ``test_wavs/``. + It contains the reference transcripts for the sound files in ``test_waves/``. The information of the test sound files is listed below: .. code-block:: bash - $ soxi icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/*.wav + $ soxi icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/*.wav - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav' + Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -532,7 +532,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav' + Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -542,7 +542,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav' + Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -586,30 +586,30 @@ The command to run CTC decoding is: --bpe-model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model \ --method ctc-decoding \ --num-classes 500 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is given below: .. code-block:: - 2021-11-10 12:12:29,554 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': None, 'HLG': None, 'bpe_model': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model', 'method': 'ctc-decoding', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 12:12:29,554 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': None, 'HLG': None, 'bpe_model': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model', 'method': 'ctc-decoding', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 12:12:29,554 INFO [pretrained.py:266] device: cuda:0 2021-11-10 12:12:29,554 INFO [pretrained.py:268] Creating model 2021-11-10 12:12:35,600 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 12:12:35,601 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] + 2021-11-10 12:12:35,601 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] 2021-11-10 12:12:35,758 INFO [pretrained.py:301] Decoding started 2021-11-10 12:12:36,025 INFO [pretrained.py:319] Use CTC decoding 2021-11-10 12:12:36,204 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROFFELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED B OSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 12:12:36,204 INFO [pretrained.py:427] Decoding Done @@ -630,30 +630,30 @@ The command to run HLG decoding is: --method 1best \ --num-classes 500 \ --HLG ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is given below: .. code-block:: - 2021-11-10 13:33:03,723 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': '1best', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 13:33:03,723 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': '1best', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 13:33:03,723 INFO [pretrained.py:266] device: cuda:0 2021-11-10 13:33:03,723 INFO [pretrained.py:268] Creating model 2021-11-10 13:33:09,775 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:33:09,776 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] + 2021-11-10 13:33:09,776 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] 2021-11-10 13:33:09,881 INFO [pretrained.py:301] Decoding started 2021-11-10 13:33:09,951 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt 2021-11-10 13:33:13,234 INFO [pretrained.py:384] Use HLG decoding 2021-11-10 13:33:13,571 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 13:33:13,571 INFO [pretrained.py:427] Decoding Done @@ -678,31 +678,31 @@ The command to run HLG decoding + LM rescoring is: --HLG ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ --G ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt \ --ngram-lm-scale 1.0 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav Its output is: .. code-block:: - 2021-11-10 13:39:55,857 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'whole-lattice-rescoring', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 1.0, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-$it-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 13:39:55,857 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'whole-lattice-rescoring', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 1.0, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-$it-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 13:39:55,858 INFO [pretrained.py:266] device: cuda:0 2021-11-10 13:39:55,858 INFO [pretrained.py:268] Creating model 2021-11-10 13:40:01,979 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:40:01,980 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] + 2021-11-10 13:40:01,980 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] 2021-11-10 13:40:02,055 INFO [pretrained.py:301] Decoding started 2021-11-10 13:40:02,117 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt 2021-11-10 13:40:05,051 INFO [pretrained.py:363] Loading G from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt 2021-11-10 13:40:18,959 INFO [pretrained.py:389] Use HLG decoding + LM rescoring 2021-11-10 13:40:19,546 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 13:40:19,546 INFO [pretrained.py:427] Decoding Done @@ -733,31 +733,31 @@ The command to run HLG decoding + LM rescoring + attention decoder rescoring is: --num-paths 100 \ --sos-id 1 \ --eos-id 1 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is below: .. code-block:: - 2021-11-10 13:43:45,598 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 6, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'attention-decoder', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 2.0, 'attention_decoder_scale': 2.0, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 13:43:45,598 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 6, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'attention-decoder', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 2.0, 'attention_decoder_scale': 2.0, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 13:43:45,599 INFO [pretrained.py:266] device: cuda:0 2021-11-10 13:43:45,599 INFO [pretrained.py:268] Creating model 2021-11-10 13:43:51,833 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:43:51,834 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] + 2021-11-10 13:43:51,834 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] 2021-11-10 13:43:51,915 INFO [pretrained.py:301] Decoding started 2021-11-10 13:43:52,076 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt 2021-11-10 13:43:55,110 INFO [pretrained.py:363] Loading G from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt 2021-11-10 13:44:09,329 INFO [pretrained.py:397] Use HLG + LM rescoring + attention decoder rescoring 2021-11-10 13:44:10,192 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 13:44:10,192 INFO [pretrained.py:427] Decoding Done @@ -896,9 +896,9 @@ CTC decoding --use_gpu true \ --nn_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/cpu_jit.pt \ --bpe_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav Its output is: @@ -916,13 +916,13 @@ Its output is: 2021-11-10 13:58:02.708 [I] k2/torch/bin/ctc_decode.cu:207:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROFFELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION HLG decoding @@ -935,9 +935,9 @@ HLG decoding --nn_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/cpu_jit.pt \ --hlg ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is: @@ -955,13 +955,13 @@ The output is: 2021-11-10 13:59:13.268 [I] k2/torch/bin/hlg_decode.cu:216:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION @@ -977,9 +977,9 @@ HLG decoding + n-gram LM rescoring --g ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt \ --ngram_lm_scale 1.0 \ --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is: @@ -1001,13 +1001,13 @@ The output is: 2021-11-10 14:01:08.68 [I] k2/torch/bin/ngram_lm_rescore.cu:242:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION @@ -1028,9 +1028,9 @@ HLG decoding + n-gram LM rescoring + attention decoder rescoring --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ --sos_id 1 \ --eos_id 1 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav The output is: @@ -1054,13 +1054,13 @@ The output is: 2021-11-10 14:02:57.179 [I] k2/torch/bin/attention_rescore.cu:369:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION There is a Colab notebook showing you how to run a torch scripted model in C++. diff --git a/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst b/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst index ca477fbaa3..39541f281d 100644 --- a/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst +++ b/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst @@ -224,7 +224,7 @@ After downloading, you will have the following files: | `-- G_4_gram.pt |-- exp | `-- pretrained.pt - `-- test_wavs + `-- test_waves |-- 1089-134686-0001.flac |-- 1221-135766-0001.flac |-- 1221-135766-0002.flac @@ -268,9 +268,9 @@ The information of the test sound files is listed below: .. code-block:: bash - $ soxi tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/*.flac + $ soxi tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/*.flac - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac' + Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -280,7 +280,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit FLAC - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac' + Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -290,7 +290,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit FLAC - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac' + Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -320,9 +320,9 @@ To decode with ``1best`` method, we can use: --checkpoint ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/exp/pretraind.pt \ --words-file ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/words.txt \ --HLG ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac The output is: @@ -332,17 +332,17 @@ The output is: 2021-08-24 16:57:13,315 INFO [pretrained.py:170] Creating model 2021-08-24 16:57:18,331 INFO [pretrained.py:182] Loading HLG from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt 2021-08-24 16:57:27,581 INFO [pretrained.py:199] Constructing Fbank computer - 2021-08-24 16:57:27,584 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac'] + 2021-08-24 16:57:27,584 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac'] 2021-08-24 16:57:27,599 INFO [pretrained.py:215] Decoding started 2021-08-24 16:57:27,791 INFO [pretrained.py:245] Use HLG decoding 2021-08-24 16:57:28,098 INFO [pretrained.py:266] - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION @@ -360,9 +360,9 @@ To decode with ``whole-lattice-rescoring`` methond, you can use --method whole-lattice-rescoring \ --G ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lm/G_4_gram.pt \ --ngram-lm-scale 0.8 \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac The decoding output is: @@ -373,17 +373,17 @@ The decoding output is: 2021-08-24 16:39:29,403 INFO [pretrained.py:182] Loading HLG from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt 2021-08-24 16:39:40,631 INFO [pretrained.py:190] Loading G from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lm/G_4_gram.pt 2021-08-24 16:39:53,098 INFO [pretrained.py:199] Constructing Fbank computer - 2021-08-24 16:39:53,107 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac'] + 2021-08-24 16:39:53,107 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac'] 2021-08-24 16:39:53,121 INFO [pretrained.py:215] Decoding started 2021-08-24 16:39:53,443 INFO [pretrained.py:250] Use HLG decoding + LM rescoring 2021-08-24 16:39:54,010 INFO [pretrained.py:266] - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION diff --git a/docs/source/recipes/timit/tdnn_ligru_ctc.rst b/docs/source/recipes/timit/tdnn_ligru_ctc.rst index 186420ee7c..a553a4df72 100644 --- a/docs/source/recipes/timit/tdnn_ligru_ctc.rst +++ b/docs/source/recipes/timit/tdnn_ligru_ctc.rst @@ -222,7 +222,7 @@ After downloading, you will have the following files: | `-- G_4_gram.pt |-- exp | `-- pretrained_average_9_25.pt - `-- test_wavs + `-- test_waves |-- FDHC0_SI1559.WAV |-- FELC0_SI756.WAV |-- FMGD0_SI1564.WAV diff --git a/docs/source/recipes/timit/tdnn_lstm_ctc.rst b/docs/source/recipes/timit/tdnn_lstm_ctc.rst index 6f760a9ce6..4abaddeca5 100644 --- a/docs/source/recipes/timit/tdnn_lstm_ctc.rst +++ b/docs/source/recipes/timit/tdnn_lstm_ctc.rst @@ -220,7 +220,7 @@ After downloading, you will have the following files: | `-- G_4_gram.pt |-- exp | `-- pretrained_average_16_25.pt - `-- test_wavs + `-- test_waves |-- FDHC0_SI1559.WAV |-- FELC0_SI756.WAV |-- FMGD0_SI1564.WAV From 53752548c9913bb8a51acc4b5257ef31c6516fa9 Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Mon, 10 Oct 2022 13:55:31 +0800 Subject: [PATCH 03/20] Delete modules.xml --- .idea/modules.xml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .idea/modules.xml diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index b33405972e..0000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 2de385076f79af5aa3da6a0df0551d2d891dfed5 Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Mon, 10 Oct 2022 13:55:46 +0800 Subject: [PATCH 04/20] Delete .gitignore --- .idea/.gitignore | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .idea/.gitignore diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81b0..0000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml From 16e540cfbe9e306102626d122a80c52b31f45f3f Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Mon, 10 Oct 2022 13:56:54 +0800 Subject: [PATCH 05/20] Delete icefall.iml --- .idea/icefall.iml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .idea/icefall.iml diff --git a/.idea/icefall.iml b/.idea/icefall.iml deleted file mode 100644 index 3ed51aeda3..0000000000 --- a/.idea/icefall.iml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file From f57ee009e8175c8057b5d4864e63a738df7e96de Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Mon, 10 Oct 2022 13:57:08 +0800 Subject: [PATCH 06/20] Delete Project_Default.xml --- .idea/inspectionProfiles/Project_Default.xml | 27 -------------------- 1 file changed, 27 deletions(-) delete mode 100644 .idea/inspectionProfiles/Project_Default.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 8877b1a06d..0000000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - \ No newline at end of file From b50cdedff247933fd61cd02346361f833fcb46b0 Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Mon, 10 Oct 2022 13:57:24 +0800 Subject: [PATCH 07/20] Delete profiles_settings.xml --- .idea/inspectionProfiles/profiles_settings.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2da2d..0000000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file From 91e809f9b39d6dfe6c31a91d3482d3f12b56aa39 Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Mon, 10 Oct 2022 13:57:36 +0800 Subject: [PATCH 08/20] Delete vcs.xml --- .idea/vcs.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7f4c..0000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From f29a88aa548d25e0671d94a9586adfc66d3ff3d8 Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Mon, 10 Oct 2022 17:20:12 +0800 Subject: [PATCH 09/20] Delete conformer_ctc.rst --- .../recipes/librispeech/conformer_ctc.rst | 1070 ----------------- 1 file changed, 1070 deletions(-) delete mode 100644 docs/source/recipes/librispeech/conformer_ctc.rst diff --git a/docs/source/recipes/librispeech/conformer_ctc.rst b/docs/source/recipes/librispeech/conformer_ctc.rst deleted file mode 100644 index 3be776fc5d..0000000000 --- a/docs/source/recipes/librispeech/conformer_ctc.rst +++ /dev/null @@ -1,1070 +0,0 @@ -Conformer CTC -============= - -This tutorial shows you how to run a conformer ctc model -with the `LibriSpeech `_ dataset. - - -.. HINT:: - - We assume you have read the page :ref:`install icefall` and have setup - the environment for ``icefall``. - -.. HINT:: - - We recommend you to use a GPU or several GPUs to run this recipe. - -In this tutorial, you will learn: - - - (1) How to prepare data for training and decoding - - (2) How to start the training, either with a single GPU or multiple GPUs - - (3) How to do decoding after training, with n-gram LM rescoring and attention decoder rescoring - - (4) How to use a pre-trained model, provided by us - - (5) How to deploy your trained model in C++, without Python dependencies - -Data preparation ----------------- - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./prepare.sh - -The script ``./prepare.sh`` handles the data preparation for you, **automagically**. -All you need to do is to run it. - -The data preparation contains several stages, you can use the following two -options: - - - ``--stage`` - - ``--stop-stage`` - -to control which stage(s) should be run. By default, all stages are executed. - - -For example, - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./prepare.sh --stage 0 --stop-stage 0 - -means to run only stage 0. - -To run stage 2 to stage 5, use: - -.. code-block:: bash - - $ ./prepare.sh --stage 2 --stop-stage 5 - -.. HINT:: - - If you have pre-downloaded the `LibriSpeech `_ - dataset and the `musan `_ dataset, say, - they are saved in ``/tmp/LibriSpeech`` and ``/tmp/musan``, you can modify - the ``dl_dir`` variable in ``./prepare.sh`` to point to ``/tmp`` so that - ``./prepare.sh`` won't re-download them. - -.. NOTE:: - - All generated files by ``./prepare.sh``, e.g., features, lexicon, etc, - are saved in ``./data`` directory. - -We provide the following YouTube video showing how to run ``./prepare.sh``. - -.. note:: - - To get the latest news of `next-gen Kaldi `_, please subscribe - the following YouTube channel by `Nadira Povey `_: - - ``_ - -.. youtube:: ofEIoJL-mGM - - -Training --------- - -Configurable options -~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./conformer_ctc/train.py --help - -shows you the training options that can be passed from the commandline. -The following options are used quite often: - - - ``--full-libri`` - - If it's True, the training part uses all the training data, i.e., - 960 hours. Otherwise, the training part uses only the subset - ``train-clean-100``, which has 100 hours of training data. - - .. CAUTION:: - - The training set is perturbed by speed with two factors: 0.9 and 1.1. - If ``--full-libri`` is True, each epoch actually processes - ``3x960 == 2880`` hours of data. - - - ``--num-epochs`` - - It is the number of epochs to train. For instance, - ``./conformer_ctc/train.py --num-epochs 30`` trains for 30 epochs - and generates ``epoch-0.pt``, ``epoch-1.pt``, ..., ``epoch-29.pt`` - in the folder ``./conformer_ctc/exp``. - - - ``--start-epoch`` - - It's used to resume training. - ``./conformer_ctc/train.py --start-epoch 10`` loads the - checkpoint ``./conformer_ctc/exp/epoch-9.pt`` and starts - training from epoch 10, based on the state from epoch 9. - - - ``--world-size`` - - It is used for multi-GPU single-machine DDP training. - - - (a) If it is 1, then no DDP training is used. - - - (b) If it is 2, then GPU 0 and GPU 1 are used for DDP training. - - The following shows some use cases with it. - - **Use case 1**: You have 4 GPUs, but you only want to use GPU 0 and - GPU 2 for training. You can do the following: - - .. code-block:: bash - - $ cd egs/librispeech/ASR - $ export CUDA_VISIBLE_DEVICES="0,2" - $ ./conformer_ctc/train.py --world-size 2 - - **Use case 2**: You have 4 GPUs and you want to use all of them - for training. You can do the following: - - .. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./conformer_ctc/train.py --world-size 4 - - **Use case 3**: You have 4 GPUs but you only want to use GPU 3 - for training. You can do the following: - - .. code-block:: bash - - $ cd egs/librispeech/ASR - $ export CUDA_VISIBLE_DEVICES="3" - $ ./conformer_ctc/train.py --world-size 1 - - .. CAUTION:: - - Only multi-GPU single-machine DDP training is implemented at present. - Multi-GPU multi-machine DDP training will be added later. - - - ``--max-duration`` - - It specifies the number of seconds over all utterances in a - batch, before **padding**. - If you encounter CUDA OOM, please reduce it. For instance, if - your are using V100 NVIDIA GPU, we recommend you to set it to ``200``. - - .. HINT:: - - Due to padding, the number of seconds of all utterances in a - batch will usually be larger than ``--max-duration``. - - A larger value for ``--max-duration`` may cause OOM during training, - while a smaller value may increase the training time. You have to - tune it. - - -Pre-configured options -~~~~~~~~~~~~~~~~~~~~~~ - -There are some training options, e.g., weight decay, -number of warmup steps, results dir, etc, -that are not passed from the commandline. -They are pre-configured by the function ``get_params()`` in -`conformer_ctc/train.py `_ - -You don't need to change these pre-configured parameters. If you really need to change -them, please modify ``./conformer_ctc/train.py`` directly. - - -Training logs -~~~~~~~~~~~~~ - -Training logs and checkpoints are saved in ``conformer_ctc/exp``. -You will find the following files in that directory: - - - ``epoch-0.pt``, ``epoch-1.pt``, ... - - These are checkpoint files, containing model ``state_dict`` and optimizer ``state_dict``. - To resume training from some checkpoint, say ``epoch-10.pt``, you can use: - - .. code-block:: bash - - $ ./conformer_ctc/train.py --start-epoch 11 - - - ``tensorboard/`` - - This folder contains TensorBoard logs. Training loss, validation loss, learning - rate, etc, are recorded in these logs. You can visualize them by: - - .. code-block:: bash - - $ cd conformer_ctc/exp/tensorboard - $ tensorboard dev upload --logdir . --description "Conformer CTC training for LibriSpeech with icefall" - - It will print something like below: - - .. code-block:: - - TensorFlow installation not found - running with reduced feature set. - Upload started and will continue reading any new data as it's added to the logdir. - - To stop uploading, press Ctrl-C. - - New experiment created. View your TensorBoard at: https://tensorboard.dev/experiment/lzGnETjwRxC3yghNMd4kPw/ - - [2021-08-24T16:42:43] Started scanning logdir. - Uploading 4540 scalars... - - Note there is a URL in the above output, click it and you will see - the following screenshot: - - .. figure:: images/librispeech-conformer-ctc-tensorboard-log.png - :width: 600 - :alt: TensorBoard screenshot - :align: center - :target: https://tensorboard.dev/experiment/lzGnETjwRxC3yghNMd4kPw/ - - TensorBoard screenshot. - - - ``log/log-train-xxxx`` - - It is the detailed training log in text format, same as the one - you saw printed to the console during training. - -Usage examples -~~~~~~~~~~~~~~ - -The following shows typical use cases: - -**Case 1** -^^^^^^^^^^ - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./conformer_ctc/train.py --max-duration 200 --full-libri 0 - -It uses ``--max-duration`` of 200 to avoid OOM. Also, it uses only -a subset of the LibriSpeech data for training. - - -**Case 2** -^^^^^^^^^^ - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ export CUDA_VISIBLE_DEVICES="0,3" - $ ./conformer_ctc/train.py --world-size 2 - -It uses GPU 0 and GPU 3 for DDP training. - -**Case 3** -^^^^^^^^^^ - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./conformer_ctc/train.py --num-epochs 10 --start-epoch 3 - -It loads checkpoint ``./conformer_ctc/exp/epoch-2.pt`` and starts -training from epoch 3. Also, it trains for 10 epochs. - -Decoding --------- - -The decoding part uses checkpoints saved by the training part, so you have -to run the training part first. - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./conformer_ctc/decode.py --help - -shows the options for decoding. - -The commonly used options are: - - - ``--method`` - - This specifies the decoding method. This script supports 7 decoding methods. - As for ctc decoding, it uses a sentence piece model to convert word pieces to words. - And it needs neither a lexicon nor an n-gram LM. - - For example, the following command uses CTC topology for decoding: - - .. code-block:: - - $ cd egs/librispeech/ASR - $ ./conformer_ctc/decode.py --method ctc-decoding --max-duration 300 - # Caution: The above command is tested with a model with vocab size 500. - - And the following command uses attention decoder for rescoring: - - .. code-block:: - - $ cd egs/librispeech/ASR - $ ./conformer_ctc/decode.py --method attention-decoder --max-duration 30 --nbest-scale 0.5 - - - ``--nbest-scale`` - - It is used to scale down lattice scores so that there are more unique - paths for rescoring. - - - ``--max-duration`` - - It has the same meaning as the one during training. A larger - value may cause OOM. - -Here are some results for CTC decoding with a vocab size of 500: - -Usage: - -.. code-block:: bash - - $ cd egs/librispeech/ASR - # NOTE: Tested with a model with vocab size 500. - # It won't work for a model with vocab size 5000. - $ ./conformer_ctc/decode.py \ - --epoch 25 \ - --avg 1 \ - --max-duration 300 \ - --exp-dir conformer_ctc/exp \ - --lang-dir data/lang_bpe_500 \ - --method ctc-decoding - -The output is given below: - -.. code-block:: bash - - 2021-09-26 12:44:31,033 INFO [decode.py:537] Decoding started - 2021-09-26 12:44:31,033 INFO [decode.py:538] - {'lm_dir': PosixPath('data/lm'), 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, - 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 6, 'search_beam': 20, 'output_beam': 8, - 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, - 'epoch': 25, 'avg': 1, 'method': 'ctc-decoding', 'num_paths': 100, 'nbest_scale': 0.5, - 'export': False, 'exp_dir': PosixPath('conformer_ctc/exp'), 'lang_dir': PosixPath('data/lang_bpe_500'), 'full_libri': False, - 'feature_dir': PosixPath('data/fbank'), 'max_duration': 100, 'bucketing_sampler': False, 'num_buckets': 30, - 'concatenate_cuts': False, 'duration_factor': 1.0, 'gap': 1.0, 'on_the_fly_feats': False, - 'shuffle': True, 'return_cuts': True, 'num_workers': 2} - 2021-09-26 12:44:31,406 INFO [lexicon.py:113] Loading pre-compiled data/lang_bpe_500/Linv.pt - 2021-09-26 12:44:31,464 INFO [decode.py:548] device: cuda:0 - 2021-09-26 12:44:36,171 INFO [checkpoint.py:92] Loading checkpoint from conformer_ctc/exp/epoch-25.pt - 2021-09-26 12:44:36,776 INFO [decode.py:652] Number of model parameters: 109226120 - 2021-09-26 12:44:37,714 INFO [decode.py:473] batch 0/206, cuts processed until now is 12 - 2021-09-26 12:45:15,944 INFO [decode.py:473] batch 100/206, cuts processed until now is 1328 - 2021-09-26 12:45:54,443 INFO [decode.py:473] batch 200/206, cuts processed until now is 2563 - 2021-09-26 12:45:56,411 INFO [decode.py:494] The transcripts are stored in conformer_ctc/exp/recogs-test-clean-ctc-decoding.txt - 2021-09-26 12:45:56,592 INFO [utils.py:331] [test-clean-ctc-decoding] %WER 3.26% [1715 / 52576, 163 ins, 128 del, 1424 sub ] - 2021-09-26 12:45:56,807 INFO [decode.py:506] Wrote detailed error stats to conformer_ctc/exp/errs-test-clean-ctc-decoding.txt - 2021-09-26 12:45:56,808 INFO [decode.py:522] - For test-clean, WER of different settings are: - ctc-decoding 3.26 best for test-clean - - 2021-09-26 12:45:57,362 INFO [decode.py:473] batch 0/203, cuts processed until now is 15 - 2021-09-26 12:46:35,565 INFO [decode.py:473] batch 100/203, cuts processed until now is 1477 - 2021-09-26 12:47:15,106 INFO [decode.py:473] batch 200/203, cuts processed until now is 2922 - 2021-09-26 12:47:16,131 INFO [decode.py:494] The transcripts are stored in conformer_ctc/exp/recogs-test-other-ctc-decoding.txt - 2021-09-26 12:47:16,208 INFO [utils.py:331] [test-other-ctc-decoding] %WER 8.21% [4295 / 52343, 396 ins, 315 del, 3584 sub ] - 2021-09-26 12:47:16,432 INFO [decode.py:506] Wrote detailed error stats to conformer_ctc/exp/errs-test-other-ctc-decoding.txt - 2021-09-26 12:47:16,432 INFO [decode.py:522] - For test-other, WER of different settings are: - ctc-decoding 8.21 best for test-other - - 2021-09-26 12:47:16,433 INFO [decode.py:680] Done! - -Pre-trained Model ------------------ - -We have uploaded a pre-trained model to -``_ - -We describe how to use the pre-trained model to transcribe a sound file or -multiple sound files in the following. - -Install kaldifeat -~~~~~~~~~~~~~~~~~ - -`kaldifeat `_ is used to -extract features for a single sound file or multiple sound files -at the same time. - -Please refer to ``_ for installation. - -Download the pre-trained model -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following commands describe how to download the pre-trained model: - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ git clone https://huggingface.co/csukuangfj/icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09 - $ cd icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09 - $ git lfs pull - -.. CAUTION:: - - You have to use ``git lfs pull`` to download the pre-trained model. - Otherwise, you will have the following issue when running ``decode.py``: - - .. code-block:: - - _pickle.UnpicklingError: invalid load key, 'v' - - To fix that issue, please use: - - .. code-block:: bash - - cd icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09 - git lfs pull - -.. CAUTION:: - - In order to use this pre-trained model, your k2 version has to be v1.9 or later. - -After downloading, you will have the following files: - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ tree icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09 - -.. code-block:: bash - - icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09 - |-- README.md - |-- data - | |-- lang_bpe_500 - | | |-- HLG.pt - | | |-- HLG_modified.pt - | | |-- bpe.model - | | |-- tokens.txt - | | `-- words.txt - | `-- lm - | `-- G_4_gram.pt - |-- exp - | |-- cpu_jit.pt - | `-- pretrained.pt - |-- log - | `-- log-decode-2021-11-09-17-38-28 - `-- test_waves - |-- 1089-134686-0001.wav - |-- 1221-135766-0001.wav - |-- 1221-135766-0002.wav - `-- trans.txt - - -**File descriptions**: - - ``data/lang_bpe_500/HLG.pt`` - - It is the decoding graph. - - - ``data/lang_bpe_500/HLG_modified.pt`` - - It uses a modified CTC topology while building HLG. - - - ``data/lang_bpe_500/bpe.model`` - - It is a sentencepiece model. You can use it to reproduce our results. - - - ``data/lang_bpe_500/tokens.txt`` - - It contains tokens and their IDs, generated from ``bpe.model``. - Provided only for convenience so that you can look up the SOS/EOS ID easily. - - - ``data/lang_bpe_500/words.txt`` - - It contains words and their IDs. - - - ``data/lm/G_4_gram.pt`` - - It is a 4-gram LM, used for n-gram LM rescoring. - - - ``exp/pretrained.pt`` - - It contains pre-trained model parameters, obtained by averaging - checkpoints from ``epoch-23.pt`` to ``epoch-77.pt``. - Note: We have removed optimizer ``state_dict`` to reduce file size. - - - ``exp/cpu_jit.pt`` - - It contains torch scripted model that can be deployed in C++. - - - ``test_waves/*.wav`` - - It contains some test sound files from LibriSpeech ``test-clean`` dataset. - - - ``test_waves/trans.txt`` - - It contains the reference transcripts for the sound files in ``test_waves/``. - -The information of the test sound files is listed below: - -.. code-block:: bash - - $ soxi icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/*.wav - - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav' - Channels : 1 - Sample Rate : 16000 - Precision : 16-bit - Duration : 00:00:06.62 = 106000 samples ~ 496.875 CDDA sectors - File Size : 212k - Bit Rate : 256k - Sample Encoding: 16-bit Signed Integer PCM - - - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav' - Channels : 1 - Sample Rate : 16000 - Precision : 16-bit - Duration : 00:00:16.71 = 267440 samples ~ 1253.62 CDDA sectors - File Size : 535k - Bit Rate : 256k - Sample Encoding: 16-bit Signed Integer PCM - - - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav' - Channels : 1 - Sample Rate : 16000 - Precision : 16-bit - Duration : 00:00:04.83 = 77200 samples ~ 361.875 CDDA sectors - File Size : 154k - Bit Rate : 256k - Sample Encoding: 16-bit Signed Integer PCM - - Total Duration of 3 files: 00:00:28.16 - -Usage -~~~~~ - -.. code-block:: - - $ cd egs/librispeech/ASR - $ ./conformer_ctc/pretrained.py --help - -displays the help information. - -It supports 4 decoding methods: - - - CTC decoding - - HLG decoding - - HLG + n-gram LM rescoring - - HLG + n-gram LM rescoring + attention decoder rescoring - -CTC decoding -^^^^^^^^^^^^ - -CTC decoding uses the best path of the decoding lattice as the decoding result -without any LM or lexicon. - -The command to run CTC decoding is: - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./conformer_ctc/pretrained.py \ - --checkpoint ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt \ - --bpe-model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model \ - --method ctc-decoding \ - --num-classes 500 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - -The output is given below: - -.. code-block:: - - 2021-11-10 12:12:29,554 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': None, 'HLG': None, 'bpe_model': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model', 'method': 'ctc-decoding', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} - 2021-11-10 12:12:29,554 INFO [pretrained.py:266] device: cuda:0 - 2021-11-10 12:12:29,554 INFO [pretrained.py:268] Creating model - 2021-11-10 12:12:35,600 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 12:12:35,601 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] - 2021-11-10 12:12:35,758 INFO [pretrained.py:301] Decoding started - 2021-11-10 12:12:36,025 INFO [pretrained.py:319] Use CTC decoding - 2021-11-10 12:12:36,204 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: - AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROFFELS - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: - GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED B - OSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: - YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION - - 2021-11-10 12:12:36,204 INFO [pretrained.py:427] Decoding Done - -HLG decoding -^^^^^^^^^^^^ - -HLG decoding uses the best path of the decoding lattice as the decoding result. - -The command to run HLG decoding is: - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./conformer_ctc/pretrained.py \ - --checkpoint ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt \ - --words-file ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - --method 1best \ - --num-classes 500 \ - --HLG ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - -The output is given below: - -.. code-block:: - - 2021-11-10 13:33:03,723 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': '1best', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} - 2021-11-10 13:33:03,723 INFO [pretrained.py:266] device: cuda:0 - 2021-11-10 13:33:03,723 INFO [pretrained.py:268] Creating model - 2021-11-10 13:33:09,775 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:33:09,776 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] - 2021-11-10 13:33:09,881 INFO [pretrained.py:301] Decoding started - 2021-11-10 13:33:09,951 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt - 2021-11-10 13:33:13,234 INFO [pretrained.py:384] Use HLG decoding - 2021-11-10 13:33:13,571 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: - AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: - GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: - YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION - - 2021-11-10 13:33:13,571 INFO [pretrained.py:427] Decoding Done - - -HLG decoding + LM rescoring -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -It uses an n-gram LM to rescore the decoding lattice and the best -path of the rescored lattice is the decoding result. - -The command to run HLG decoding + LM rescoring is: - -.. code-block:: bash - - $ cd egs/librispeech/ASR - ./conformer_ctc/pretrained.py \ - --checkpoint ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt \ - --words-file ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - --method whole-lattice-rescoring \ - --num-classes 500 \ - --HLG ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ - --G ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt \ - --ngram-lm-scale 1.0 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - -Its output is: - -.. code-block:: - - 2021-11-10 13:39:55,857 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'whole-lattice-rescoring', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 1.0, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-$it-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} - 2021-11-10 13:39:55,858 INFO [pretrained.py:266] device: cuda:0 - 2021-11-10 13:39:55,858 INFO [pretrained.py:268] Creating model - 2021-11-10 13:40:01,979 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:40:01,980 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] - 2021-11-10 13:40:02,055 INFO [pretrained.py:301] Decoding started - 2021-11-10 13:40:02,117 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt - 2021-11-10 13:40:05,051 INFO [pretrained.py:363] Loading G from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt - 2021-11-10 13:40:18,959 INFO [pretrained.py:389] Use HLG decoding + LM rescoring - 2021-11-10 13:40:19,546 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: - AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: - GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: - YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION - - 2021-11-10 13:40:19,546 INFO [pretrained.py:427] Decoding Done - - -HLG decoding + LM rescoring + attention decoder rescoring -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -It uses an n-gram LM to rescore the decoding lattice, extracts -n paths from the rescored lattice, recores the extracted paths with -an attention decoder. The path with the highest score is the decoding result. - -The command to run HLG decoding + LM rescoring + attention decoder rescoring is: - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./conformer_ctc/pretrained.py \ - --checkpoint ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt \ - --words-file ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - --method attention-decoder \ - --num-classes 500 \ - --HLG ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ - --G ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt \ - --ngram-lm-scale 2.0 \ - --attention-decoder-scale 2.0 \ - --nbest-scale 0.5 \ - --num-paths 100 \ - --sos-id 1 \ - --eos-id 1 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - -The output is below: - -.. code-block:: - - 2021-11-10 13:43:45,598 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 6, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'attention-decoder', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 2.0, 'attention_decoder_scale': 2.0, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} - 2021-11-10 13:43:45,599 INFO [pretrained.py:266] device: cuda:0 - 2021-11-10 13:43:45,599 INFO [pretrained.py:268] Creating model - 2021-11-10 13:43:51,833 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:43:51,834 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] - 2021-11-10 13:43:51,915 INFO [pretrained.py:301] Decoding started - 2021-11-10 13:43:52,076 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt - 2021-11-10 13:43:55,110 INFO [pretrained.py:363] Loading G from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt - 2021-11-10 13:44:09,329 INFO [pretrained.py:397] Use HLG + LM rescoring + attention decoder rescoring - 2021-11-10 13:44:10,192 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: - AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: - GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: - YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION - - 2021-11-10 13:44:10,192 INFO [pretrained.py:427] Decoding Done - - -Compute WER with the pre-trained model -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To check the WER of the pre-trained model on the test datasets, run: - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ cd icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/ - $ ln -s pretrained.pt epoch-999.pt - $ cd ../.. - $ ./conformer_ctc/decode.py \ - --exp-dir ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp \ - --lang-dir ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500 \ - --lm-dir ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm \ - --epoch 999 \ - --avg 1 \ - --concatenate-cuts 0 \ - --bucketing-sampler 1 \ - --max-duration 30 \ - --num-paths 1000 \ - --method attention-decoder \ - --nbest-scale 0.5 - - -Colab notebook --------------- - -We do provide a colab notebook for this recipe showing how to use a pre-trained model. - -|librispeech asr conformer ctc colab notebook| - -.. |librispeech asr conformer ctc colab notebook| image:: https://colab.research.google.com/assets/colab-badge.svg - :target: https://colab.research.google.com/drive/1huyupXAcHsUrKaWfI83iMEJ6J0Nh0213?usp=sharing - -.. HINT:: - - Due to limited memory provided by Colab, you have to upgrade to Colab Pro to - run ``HLG decoding + LM rescoring`` and - ``HLG decoding + LM rescoring + attention decoder rescoring``. - Otherwise, you can only run ``HLG decoding`` with Colab. - -**Congratulations!** You have finished the LibriSpeech ASR recipe with -conformer CTC models in ``icefall``. - -If you want to deploy your trained model in C++, please read the following section. - -Deployment with C++ -------------------- - -This section describes how to deploy the pre-trained model in C++, without -Python dependencies. - -.. HINT:: - - At present, it does NOT support streaming decoding. - -First, let us compile k2 from source: - -.. code-block:: bash - - $ cd $HOME - $ git clone https://github.com/k2-fsa/k2 - $ cd k2 - $ git checkout v2.0-pre - -.. CAUTION:: - - You have to switch to the branch ``v2.0-pre``! - -.. code-block:: bash - - $ mkdir build-release - $ cd build-release - $ cmake -DCMAKE_BUILD_TYPE=Release .. - $ make -j ctc_decode hlg_decode ngram_lm_rescore attention_rescore - - # You will find four binaries in `./bin`, i.e., - # ./bin/ctc_decode, ./bin/hlg_decode, - # ./bin/ngram_lm_rescore, and ./bin/attention_rescore - -Now you are ready to go! - -Assume you have run: - - .. code-block:: bash - - $ cd k2/build-release - $ ln -s /path/to/icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09 ./ - -To view the usage of ``./bin/ctc_decode``, run: - -.. code-block:: - - $ ./bin/ctc_decode - -It will show you the following message: - -.. code-block:: bash - - Please provide --nn_model - - This file implements decoding with a CTC topology, without any - kinds of LM or lexicons. - - Usage: - ./bin/ctc_decode \ - --use_gpu true \ - --nn_model \ - --bpe_model \ - \ - \ - - - To see all possible options, use - ./bin/ctc_decode --help - - Caution: - - Only sound files (*.wav) with single channel are supported. - - It assumes the model is conformer_ctc/transformer.py from icefall. - If you use a different model, you have to change the code - related to `model.forward` in this file. - - -CTC decoding -^^^^^^^^^^^^ - -.. code-block:: bash - - ./bin/ctc_decode \ - --use_gpu true \ - --nn_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/cpu_jit.pt \ - --bpe_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - -Its output is: - -.. code-block:: - - 2021-11-10 13:57:55.316 [I] k2/torch/bin/ctc_decode.cu:105:int main(int, char**) Use GPU - 2021-11-10 13:57:55.316 [I] k2/torch/bin/ctc_decode.cu:109:int main(int, char**) Device: cuda:0 - 2021-11-10 13:57:55.316 [I] k2/torch/bin/ctc_decode.cu:118:int main(int, char**) Load wave files - 2021-11-10 13:58:01.221 [I] k2/torch/bin/ctc_decode.cu:125:int main(int, char**) Build Fbank computer - 2021-11-10 13:58:01.222 [I] k2/torch/bin/ctc_decode.cu:136:int main(int, char**) Compute features - 2021-11-10 13:58:01.228 [I] k2/torch/bin/ctc_decode.cu:144:int main(int, char**) Load neural network model - 2021-11-10 13:58:02.19 [I] k2/torch/bin/ctc_decode.cu:159:int main(int, char**) Compute nnet_output - 2021-11-10 13:58:02.543 [I] k2/torch/bin/ctc_decode.cu:174:int main(int, char**) Build CTC topo - 2021-11-10 13:58:02.547 [I] k2/torch/bin/ctc_decode.cu:177:int main(int, char**) Decoding - 2021-11-10 13:58:02.708 [I] k2/torch/bin/ctc_decode.cu:207:int main(int, char**) - Decoding result: - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav - AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROFFELS - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav - GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION - -HLG decoding -^^^^^^^^^^^^ - -.. code-block:: bash - - ./bin/hlg_decode \ - --use_gpu true \ - --nn_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/cpu_jit.pt \ - --hlg ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ - --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - -The output is: - -.. code-block:: - - 2021-11-10 13:59:04.729 [I] k2/torch/bin/hlg_decode.cu:111:int main(int, char**) Use GPU - 2021-11-10 13:59:04.729 [I] k2/torch/bin/hlg_decode.cu:115:int main(int, char**) Device: cuda:0 - 2021-11-10 13:59:04.729 [I] k2/torch/bin/hlg_decode.cu:124:int main(int, char**) Load wave files - 2021-11-10 13:59:10.702 [I] k2/torch/bin/hlg_decode.cu:131:int main(int, char**) Build Fbank computer - 2021-11-10 13:59:10.703 [I] k2/torch/bin/hlg_decode.cu:142:int main(int, char**) Compute features - 2021-11-10 13:59:10.707 [I] k2/torch/bin/hlg_decode.cu:150:int main(int, char**) Load neural network model - 2021-11-10 13:59:11.545 [I] k2/torch/bin/hlg_decode.cu:165:int main(int, char**) Compute nnet_output - 2021-11-10 13:59:12.72 [I] k2/torch/bin/hlg_decode.cu:180:int main(int, char**) Load ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt - 2021-11-10 13:59:12.994 [I] k2/torch/bin/hlg_decode.cu:185:int main(int, char**) Decoding - 2021-11-10 13:59:13.268 [I] k2/torch/bin/hlg_decode.cu:216:int main(int, char**) - Decoding result: - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav - AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav - GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION - - -HLG decoding + n-gram LM rescoring -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: bash - - ./bin/ngram_lm_rescore \ - --use_gpu true \ - --nn_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/cpu_jit.pt \ - --hlg ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ - --g ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt \ - --ngram_lm_scale 1.0 \ - --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - -The output is: - -.. code-block:: - - 2021-11-10 14:00:55.279 [I] k2/torch/bin/ngram_lm_rescore.cu:122:int main(int, char**) Use GPU - 2021-11-10 14:00:55.280 [I] k2/torch/bin/ngram_lm_rescore.cu:126:int main(int, char**) Device: cuda:0 - 2021-11-10 14:00:55.280 [I] k2/torch/bin/ngram_lm_rescore.cu:135:int main(int, char**) Load wave files - 2021-11-10 14:01:01.214 [I] k2/torch/bin/ngram_lm_rescore.cu:142:int main(int, char**) Build Fbank computer - 2021-11-10 14:01:01.215 [I] k2/torch/bin/ngram_lm_rescore.cu:153:int main(int, char**) Compute features - 2021-11-10 14:01:01.219 [I] k2/torch/bin/ngram_lm_rescore.cu:161:int main(int, char**) Load neural network model - 2021-11-10 14:01:01.945 [I] k2/torch/bin/ngram_lm_rescore.cu:176:int main(int, char**) Compute nnet_output - 2021-11-10 14:01:02.475 [I] k2/torch/bin/ngram_lm_rescore.cu:191:int main(int, char**) Load ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt - 2021-11-10 14:01:03.398 [I] k2/torch/bin/ngram_lm_rescore.cu:199:int main(int, char**) Decoding - 2021-11-10 14:01:03.515 [I] k2/torch/bin/ngram_lm_rescore.cu:205:int main(int, char**) Load n-gram LM: ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt - 2021-11-10 14:01:07.432 [W] k2/torch/csrc/deserialization.cu:441:k2::FsaClass k2::LoadFsa(const string&, c10::optional) - Ignore non tensor attribute: 'dummy' of type: Int - 2021-11-10 14:01:07.589 [I] k2/torch/bin/ngram_lm_rescore.cu:214:int main(int, char**) Rescore with an n-gram LM - 2021-11-10 14:01:08.68 [I] k2/torch/bin/ngram_lm_rescore.cu:242:int main(int, char**) - Decoding result: - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav - AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav - GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION - - -HLG decoding + n-gram LM rescoring + attention decoder rescoring -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: bash - - ./bin/attention_rescore \ - --use_gpu true \ - --nn_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/cpu_jit.pt \ - --hlg ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ - --g ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt \ - --ngram_lm_scale 2.0 \ - --attention_scale 2.0 \ - --num_paths 100 \ - --nbest_scale 0.5 \ - --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - --sos_id 1 \ - --eos_id 1 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - -The output is: - -.. code-block:: - - 2021-11-10 14:02:43.656 [I] k2/torch/bin/attention_rescore.cu:149:int main(int, char**) Use GPU - 2021-11-10 14:02:43.656 [I] k2/torch/bin/attention_rescore.cu:153:int main(int, char**) Device: cuda:0 - 2021-11-10 14:02:43.656 [I] k2/torch/bin/attention_rescore.cu:162:int main(int, char**) Load wave files - 2021-11-10 14:02:49.216 [I] k2/torch/bin/attention_rescore.cu:169:int main(int, char**) Build Fbank computer - 2021-11-10 14:02:49.217 [I] k2/torch/bin/attention_rescore.cu:180:int main(int, char**) Compute features - 2021-11-10 14:02:49.222 [I] k2/torch/bin/attention_rescore.cu:188:int main(int, char**) Load neural network model - 2021-11-10 14:02:49.984 [I] k2/torch/bin/attention_rescore.cu:203:int main(int, char**) Compute nnet_output - 2021-11-10 14:02:50.624 [I] k2/torch/bin/attention_rescore.cu:220:int main(int, char**) Load ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt - 2021-11-10 14:02:51.519 [I] k2/torch/bin/attention_rescore.cu:228:int main(int, char**) Decoding - 2021-11-10 14:02:51.632 [I] k2/torch/bin/attention_rescore.cu:234:int main(int, char**) Load n-gram LM: ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt - 2021-11-10 14:02:55.537 [W] k2/torch/csrc/deserialization.cu:441:k2::FsaClass k2::LoadFsa(const string&, c10::optional) Ignore non tensor attribute: 'dummy' of type: Int - 2021-11-10 14:02:55.645 [I] k2/torch/bin/attention_rescore.cu:243:int main(int, char**) Rescore with an n-gram LM - 2021-11-10 14:02:55.970 [I] k2/torch/bin/attention_rescore.cu:246:int main(int, char**) Sample 100 paths - 2021-11-10 14:02:56.215 [I] k2/torch/bin/attention_rescore.cu:293:int main(int, char**) Run attention decoder - 2021-11-10 14:02:57.35 [I] k2/torch/bin/attention_rescore.cu:303:int main(int, char**) Rescoring - 2021-11-10 14:02:57.179 [I] k2/torch/bin/attention_rescore.cu:369:int main(int, char**) - Decoding result: - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav - AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav - GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav - YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION - -There is a Colab notebook showing you how to run a torch scripted model in C++. -Please see |librispeech asr conformer ctc torch script colab notebook| - -.. |librispeech asr conformer ctc torch script colab notebook| image:: https://colab.research.google.com/assets/colab-badge.svg - :target: https://colab.research.google.com/drive/1BIGLWzS36isskMXHKcqC9ysN6pspYXs_?usp=sharing From 57fd997785277d67820b9d3ca0f9913366ba440c Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Mon, 10 Oct 2022 17:25:57 +0800 Subject: [PATCH 10/20] Delete tdnn_lstm_ctc.rst --- .../recipes/librispeech/tdnn_lstm_ctc.rst | 404 ------------------ 1 file changed, 404 deletions(-) delete mode 100644 docs/source/recipes/librispeech/tdnn_lstm_ctc.rst diff --git a/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst b/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst deleted file mode 100644 index 39541f281d..0000000000 --- a/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst +++ /dev/null @@ -1,404 +0,0 @@ -TDNN-LSTM-CTC -============= - -This tutorial shows you how to run a TDNN-LSTM-CTC model with the `LibriSpeech `_ dataset. - - -.. HINT:: - - We assume you have read the page :ref:`install icefall` and have setup - the environment for ``icefall``. - - -Data preparation ----------------- - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./prepare.sh - -The script ``./prepare.sh`` handles the data preparation for you, **automagically**. -All you need to do is to run it. - -The data preparation contains several stages, you can use the following two -options: - - - ``--stage`` - - ``--stop-stage`` - -to control which stage(s) should be run. By default, all stages are executed. - - -For example, - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./prepare.sh --stage 0 --stop-stage 0 - -means to run only stage 0. - -To run stage 2 to stage 5, use: - -.. code-block:: bash - - $ ./prepare.sh --stage 2 --stop-stage 5 - -We provide the following YouTube video showing how to run ``./prepare.sh``. - -.. note:: - - To get the latest news of `next-gen Kaldi `_, please subscribe - the following YouTube channel by `Nadira Povey `_: - - ``_ - -.. youtube:: ofEIoJL-mGM - -Training --------- - -Now describing the training of TDNN-LSTM-CTC model, contained in -the `tdnn_lstm_ctc `_ -folder. - -The command to run the training part is: - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ export CUDA_VISIBLE_DEVICES="0,1,2,3" - $ ./tdnn_lstm_ctc/train.py --world-size 4 - -By default, it will run ``20`` epochs. Training logs and checkpoints are saved -in ``tdnn_lstm_ctc/exp``. - -In ``tdnn_lstm_ctc/exp``, you will find the following files: - - - ``epoch-0.pt``, ``epoch-1.pt``, ..., ``epoch-19.pt`` - - These are checkpoint files, containing model ``state_dict`` and optimizer ``state_dict``. - To resume training from some checkpoint, say ``epoch-10.pt``, you can use: - - .. code-block:: bash - - $ ./tdnn_lstm_ctc/train.py --start-epoch 11 - - - ``tensorboard/`` - - This folder contains TensorBoard logs. Training loss, validation loss, learning - rate, etc, are recorded in these logs. You can visualize them by: - - .. code-block:: bash - - $ cd tdnn_lstm_ctc/exp/tensorboard - $ tensorboard dev upload --logdir . --description "TDNN LSTM training for librispeech with icefall" - - - ``log/log-train-xxxx`` - - It is the detailed training log in text format, same as the one - you saw printed to the console during training. - - -To see available training options, you can use: - -.. code-block:: bash - - $ ./tdnn_lstm_ctc/train.py --help - -Other training options, e.g., learning rate, results dir, etc., are -pre-configured in the function ``get_params()`` -in `tdnn_lstm_ctc/train.py `_. -Normally, you don't need to change them. You can change them by modifying the code, if -you want. - -Decoding --------- - -The decoding part uses checkpoints saved by the training part, so you have -to run the training part first. - -The command for decoding is: - -.. code-block:: bash - - $ export CUDA_VISIBLE_DEVICES="0" - $ ./tdnn_lstm_ctc/decode.py - -You will see the WER in the output log. - -Decoded results are saved in ``tdnn_lstm_ctc/exp``. - -.. code-block:: bash - - $ ./tdnn_lstm_ctc/decode.py --help - -shows you the available decoding options. - -Some commonly used options are: - - - ``--epoch`` - - You can select which checkpoint to be used for decoding. - For instance, ``./tdnn_lstm_ctc/decode.py --epoch 10`` means to use - ``./tdnn_lstm_ctc/exp/epoch-10.pt`` for decoding. - - - ``--avg`` - - It's related to model averaging. It specifies number of checkpoints - to be averaged. The averaged model is used for decoding. - For example, the following command: - - .. code-block:: bash - - $ ./tdnn_lstm_ctc/decode.py --epoch 10 --avg 3 - - uses the average of ``epoch-8.pt``, ``epoch-9.pt`` and ``epoch-10.pt`` - for decoding. - - - ``--export`` - - If it is ``True``, i.e., ``./tdnn_lstm_ctc/decode.py --export 1``, the code - will save the averaged model to ``tdnn_lstm_ctc/exp/pretrained.pt``. - See :ref:`tdnn_lstm_ctc use a pre-trained model` for how to use it. - - -.. _tdnn_lstm_ctc use a pre-trained model: - -Pre-trained Model ------------------ - -We have uploaded the pre-trained model to -``_. - -The following shows you how to use the pre-trained model. - - -Install kaldifeat -~~~~~~~~~~~~~~~~~ - -`kaldifeat `_ is used to -extract features for a single sound file or multiple sound files -at the same time. - -Please refer to ``_ for installation. - -Download the pre-trained model -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ mkdir tmp - $ cd tmp - $ git lfs install - $ git clone https://huggingface.co/pkufool/icefall_asr_librispeech_tdnn-lstm_ctc - -.. CAUTION:: - - You have to use ``git lfs`` to download the pre-trained model. - -.. CAUTION:: - - In order to use this pre-trained model, your k2 version has to be v1.7 or later. - -After downloading, you will have the following files: - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ tree tmp - -.. code-block:: bash - - tmp/ - `-- icefall_asr_librispeech_tdnn-lstm_ctc - |-- README.md - |-- data - | |-- lang_phone - | | |-- HLG.pt - | | |-- tokens.txt - | | `-- words.txt - | `-- lm - | `-- G_4_gram.pt - |-- exp - | `-- pretrained.pt - `-- test_waves - |-- 1089-134686-0001.flac - |-- 1221-135766-0001.flac - |-- 1221-135766-0002.flac - `-- trans.txt - - 6 directories, 10 files - -**File descriptions**: - - - ``data/lang_phone/HLG.pt`` - - It is the decoding graph. - - - ``data/lang_phone/tokens.txt`` - - It contains tokens and their IDs. - - - ``data/lang_phone/words.txt`` - - It contains words and their IDs. - - - ``data/lm/G_4_gram.pt`` - - It is a 4-gram LM, useful for LM rescoring. - - - ``exp/pretrained.pt`` - - It contains pre-trained model parameters, obtained by averaging - checkpoints from ``epoch-14.pt`` to ``epoch-19.pt``. - Note: We have removed optimizer ``state_dict`` to reduce file size. - - - ``test_waves/*.flac`` - - It contains some test sound files from LibriSpeech ``test-clean`` dataset. - - - ``test_waves/trans.txt`` - - It contains the reference transcripts for the sound files in ``test_waves/``. - -The information of the test sound files is listed below: - -.. code-block:: bash - - $ soxi tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/*.flac - - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac' - Channels : 1 - Sample Rate : 16000 - Precision : 16-bit - Duration : 00:00:06.62 = 106000 samples ~ 496.875 CDDA sectors - File Size : 116k - Bit Rate : 140k - Sample Encoding: 16-bit FLAC - - - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac' - Channels : 1 - Sample Rate : 16000 - Precision : 16-bit - Duration : 00:00:16.71 = 267440 samples ~ 1253.62 CDDA sectors - File Size : 343k - Bit Rate : 164k - Sample Encoding: 16-bit FLAC - - - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac' - Channels : 1 - Sample Rate : 16000 - Precision : 16-bit - Duration : 00:00:04.83 = 77200 samples ~ 361.875 CDDA sectors - File Size : 105k - Bit Rate : 174k - Sample Encoding: 16-bit FLAC - - Total Duration of 3 files: 00:00:28.16 - - -Inference with a pre-trained model -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - $ cd egs/librispeech/ASR - $ ./tdnn_lstm_ctc/pretrained.py --help - -shows the usage information of ``./tdnn_lstm_ctc/pretrained.py``. - -To decode with ``1best`` method, we can use: - -.. code-block:: bash - - ./tdnn_lstm_ctc/pretrained.py \ - --checkpoint ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/exp/pretraind.pt \ - --words-file ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/words.txt \ - --HLG ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac - -The output is: - -.. code-block:: - - 2021-08-24 16:57:13,315 INFO [pretrained.py:168] device: cuda:0 - 2021-08-24 16:57:13,315 INFO [pretrained.py:170] Creating model - 2021-08-24 16:57:18,331 INFO [pretrained.py:182] Loading HLG from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt - 2021-08-24 16:57:27,581 INFO [pretrained.py:199] Constructing Fbank computer - 2021-08-24 16:57:27,584 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac'] - 2021-08-24 16:57:27,599 INFO [pretrained.py:215] Decoding started - 2021-08-24 16:57:27,791 INFO [pretrained.py:245] Use HLG decoding - 2021-08-24 16:57:28,098 INFO [pretrained.py:266] - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac: - AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac: - GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac: - YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION - - - 2021-08-24 16:57:28,099 INFO [pretrained.py:268] Decoding Done - - -To decode with ``whole-lattice-rescoring`` methond, you can use - -.. code-block:: bash - - ./tdnn_lstm_ctc/pretrained.py \ - --checkpoint ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/exp/pretraind.pt \ - --words-file ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/words.txt \ - --HLG ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt \ - --method whole-lattice-rescoring \ - --G ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lm/G_4_gram.pt \ - --ngram-lm-scale 0.8 \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac - -The decoding output is: - -.. code-block:: - - 2021-08-24 16:39:24,725 INFO [pretrained.py:168] device: cuda:0 - 2021-08-24 16:39:24,725 INFO [pretrained.py:170] Creating model - 2021-08-24 16:39:29,403 INFO [pretrained.py:182] Loading HLG from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt - 2021-08-24 16:39:40,631 INFO [pretrained.py:190] Loading G from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lm/G_4_gram.pt - 2021-08-24 16:39:53,098 INFO [pretrained.py:199] Constructing Fbank computer - 2021-08-24 16:39:53,107 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac'] - 2021-08-24 16:39:53,121 INFO [pretrained.py:215] Decoding started - 2021-08-24 16:39:53,443 INFO [pretrained.py:250] Use HLG decoding + LM rescoring - 2021-08-24 16:39:54,010 INFO [pretrained.py:266] - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac: - AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac: - GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac: - YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION - - - 2021-08-24 16:39:54,010 INFO [pretrained.py:268] Decoding Done - - -Colab notebook --------------- - -We provide a colab notebook for decoding with pre-trained model. - -|librispeech tdnn_lstm_ctc colab notebook| - -.. |librispeech tdnn_lstm_ctc colab notebook| image:: https://colab.research.google.com/assets/colab-badge.svg - :target: https://colab.research.google.com/drive/1kNmDXNMwREi0rZGAOIAOJo93REBuOTcd - - -**Congratulations!** You have finished the TDNN-LSTM-CTC recipe on librispeech in ``icefall``. From b5822a6ae9ca742cc955a226800e2a32a69b2842 Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Mon, 10 Oct 2022 17:26:21 +0800 Subject: [PATCH 11/20] Delete tdnn_lstm_ctc.rst --- docs/source/recipes/timit/tdnn_lstm_ctc.rst | 404 -------------------- 1 file changed, 404 deletions(-) delete mode 100644 docs/source/recipes/timit/tdnn_lstm_ctc.rst diff --git a/docs/source/recipes/timit/tdnn_lstm_ctc.rst b/docs/source/recipes/timit/tdnn_lstm_ctc.rst deleted file mode 100644 index 4abaddeca5..0000000000 --- a/docs/source/recipes/timit/tdnn_lstm_ctc.rst +++ /dev/null @@ -1,404 +0,0 @@ -TDNN-LSTM-CTC -============= - -This tutorial shows you how to run a TDNN-LSTM-CTC model with the `TIMIT `_ dataset. - - -.. HINT:: - - We assume you have read the page :ref:`install icefall` and have setup - the environment for ``icefall``. - - -Data preparation ----------------- - -.. code-block:: bash - - $ cd egs/timit/ASR - $ ./prepare.sh - -The script ``./prepare.sh`` handles the data preparation for you, **automagically**. -All you need to do is to run it. - -The data preparation contains several stages, you can use the following two -options: - - - ``--stage`` - - ``--stop-stage`` - -to control which stage(s) should be run. By default, all stages are executed. - - -For example, - -.. code-block:: bash - - $ cd egs/timit/ASR - $ ./prepare.sh --stage 0 --stop-stage 0 - -means to run only stage 0. - -To run stage 2 to stage 5, use: - -.. code-block:: bash - - $ ./prepare.sh --stage 2 --stop-stage 5 - - -Training --------- - -Now describing the training of TDNN-LSTM-CTC model, contained in -the `tdnn_lstm_ctc `_ -folder. - -.. HINT:: - - TIMIT is a very small dataset. So one GPU for training is enough. - -The command to run the training part is: - -.. code-block:: bash - - $ cd egs/timit/ASR - $ export CUDA_VISIBLE_DEVICES="0" - $ ./tdnn_lstm_ctc/train.py - -By default, it will run ``25`` epochs. Training logs and checkpoints are saved -in ``tdnn_lstm_ctc/exp``. - -In ``tdnn_lstm_ctc/exp``, you will find the following files: - - - ``epoch-0.pt``, ``epoch-1.pt``, ..., ``epoch-29.pt`` - - These are checkpoint files, containing model ``state_dict`` and optimizer ``state_dict``. - To resume training from some checkpoint, say ``epoch-10.pt``, you can use: - - .. code-block:: bash - - $ ./tdnn_lstm_ctc/train.py --start-epoch 11 - - - ``tensorboard/`` - - This folder contains TensorBoard logs. Training loss, validation loss, learning - rate, etc, are recorded in these logs. You can visualize them by: - - .. code-block:: bash - - $ cd tdnn_lstm_ctc/exp/tensorboard - $ tensorboard dev upload --logdir . --description "TDNN LSTM training for timit with icefall" - - - ``log/log-train-xxxx`` - - It is the detailed training log in text format, same as the one - you saw printed to the console during training. - - -To see available training options, you can use: - -.. code-block:: bash - - $ ./tdnn_lstm_ctc/train.py --help - -Other training options, e.g., learning rate, results dir, etc., are -pre-configured in the function ``get_params()`` -in `tdnn_lstm_ctc/train.py `_. -Normally, you don't need to change them. You can change them by modifying the code, if -you want. - -Decoding --------- - -The decoding part uses checkpoints saved by the training part, so you have -to run the training part first. - -The command for decoding is: - -.. code-block:: bash - - $ export CUDA_VISIBLE_DEVICES="0" - $ ./tdnn_lstm_ctc/decode.py - -You will see the WER in the output log. - -Decoded results are saved in ``tdnn_lstm_ctc/exp``. - -.. code-block:: bash - - $ ./tdnn_lstm_ctc/decode.py --help - -shows you the available decoding options. - -Some commonly used options are: - - - ``--epoch`` - - You can select which checkpoint to be used for decoding. - For instance, ``./tdnn_lstm_ctc/decode.py --epoch 10`` means to use - ``./tdnn_lstm_ctc/exp/epoch-10.pt`` for decoding. - - - ``--avg`` - - It's related to model averaging. It specifies number of checkpoints - to be averaged. The averaged model is used for decoding. - For example, the following command: - - .. code-block:: bash - - $ ./tdnn_lstm_ctc/decode.py --epoch 25 --avg 10 - - uses the average of ``epoch-16.pt``, ``epoch-17.pt``, ``epoch-18.pt``, - ``epoch-19.pt``, ``epoch-20.pt``, ``epoch-21.pt``, ``epoch-22.pt``, - ``epoch-23.pt``, ``epoch-24.pt`` and ``epoch-25.pt`` - for decoding. - - - ``--export`` - - If it is ``True``, i.e., ``./tdnn_lstm_ctc/decode.py --export 1``, the code - will save the averaged model to ``tdnn_lstm_ctc/exp/pretrained.pt``. - See :ref:`tdnn_lstm_ctc use a pre-trained model` for how to use it. - - -.. _tdnn_lstm_ctc use a pre-trained model: - -Pre-trained Model ------------------ - -We have uploaded the pre-trained model to -``_. - -The following shows you how to use the pre-trained model. - - -Install kaldifeat -~~~~~~~~~~~~~~~~~ - -`kaldifeat `_ is used to -extract features for a single sound file or multiple sound files -at the same time. - -Please refer to ``_ for installation. - -Download the pre-trained model -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - $ cd egs/timit/ASR - $ mkdir tmp-lstm - $ cd tmp-lstm - $ git lfs install - $ git clone https://huggingface.co/luomingshuang/icefall_asr_timit_tdnn_lstm_ctc - -.. CAUTION:: - - You have to use ``git lfs`` to download the pre-trained model. - -.. CAUTION:: - - In order to use this pre-trained model, your k2 version has to be v1.7 or later. - -After downloading, you will have the following files: - -.. code-block:: bash - - $ cd egs/timit/ASR - $ tree tmp-lstm - -.. code-block:: bash - - tmp-lstm/ - `-- icefall_asr_timit_tdnn_lstm_ctc - |-- README.md - |-- data - | |-- lang_phone - | | |-- HLG.pt - | | |-- tokens.txt - | | `-- words.txt - | `-- lm - | `-- G_4_gram.pt - |-- exp - | `-- pretrained_average_16_25.pt - `-- test_waves - |-- FDHC0_SI1559.WAV - |-- FELC0_SI756.WAV - |-- FMGD0_SI1564.WAV - `-- trans.txt - - 6 directories, 10 files - -**File descriptions**: - - - ``data/lang_phone/HLG.pt`` - - It is the decoding graph. - - - ``data/lang_phone/tokens.txt`` - - It contains tokens and their IDs. - - - ``data/lang_phone/words.txt`` - - It contains words and their IDs. - - - ``data/lm/G_4_gram.pt`` - - It is a 4-gram LM, useful for LM rescoring. - - - ``exp/pretrained.pt`` - - It contains pre-trained model parameters, obtained by averaging - checkpoints from ``epoch-16.pt`` to ``epoch-25.pt``. - Note: We have removed optimizer ``state_dict`` to reduce file size. - - - ``test_waves/*.WAV`` - - It contains some test sound files from timit ``TEST`` dataset. - - - ``test_waves/trans.txt`` - - It contains the reference transcripts for the sound files in ``test_waves/``. - -The information of the test sound files is listed below: - -.. code-block:: bash - - $ ffprobe -show_format tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FDHC0_SI1559.WAV - - Input #0, nistsphere, from 'tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FDHC0_SI1559.WAV': - Metadata: - database_id : TIMIT - database_version: 1.0 - utterance_id : dhc0_si1559 - sample_min : -4176 - sample_max : 5984 - Duration: 00:00:03.40, bitrate: 258 kb/s - Stream #0:0: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s - - $ ffprobe -show_format tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FELC0_SI756.WAV - - Input #0, nistsphere, from 'tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FELC0_SI756.WAV': - Metadata: - database_id : TIMIT - database_version: 1.0 - utterance_id : elc0_si756 - sample_min : -1546 - sample_max : 1989 - Duration: 00:00:04.19, bitrate: 257 kb/s - Stream #0:0: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s - - $ ffprobe -show_format tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FMGD0_SI1564.WAV - - Input #0, nistsphere, from 'tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FMGD0_SI1564.WAV': - Metadata: - database_id : TIMIT - database_version: 1.0 - utterance_id : mgd0_si1564 - sample_min : -7626 - sample_max : 10573 - Duration: 00:00:04.44, bitrate: 257 kb/s - Stream #0:0: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s - - -Inference with a pre-trained model -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - $ cd egs/timit/ASR - $ ./tdnn_lstm_ctc/pretrained.py --help - -shows the usage information of ``./tdnn_lstm_ctc/pretrained.py``. - -To decode with ``1best`` method, we can use: - -.. code-block:: bash - - ./tdnn_lstm_ctc/pretrained.py - --method 1best - --checkpoint ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/exp/pretrained_average_16_25.pt - --words-file ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/data/lang_phone/words.txt - --HLG ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/data/lang_phone/HLG.pt - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FDHC0_SI1559.WAV - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FELC0_SI756.WAV - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FMGD0_SI1564.WAV - -The output is: - -.. code-block:: - - 2021-11-08 21:02:49,583 INFO [pretrained.py:169] device: cuda:0 - 2021-11-08 21:02:49,584 INFO [pretrained.py:171] Creating model - 2021-11-08 21:02:53,816 INFO [pretrained.py:183] Loading HLG from ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/data/lang_phone/HLG.pt - 2021-11-08 21:02:53,827 INFO [pretrained.py:200] Constructing Fbank computer - 2021-11-08 21:02:53,827 INFO [pretrained.py:210] Reading sound files: ['./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FDHC0_SI1559.WAV', './tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FELC0_SI756.WAV', './tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FMGD0_SI1564.WAV'] - 2021-11-08 21:02:53,831 INFO [pretrained.py:216] Decoding started - 2021-11-08 21:02:54,380 INFO [pretrained.py:246] Use HLG decoding - 2021-11-08 21:02:54,387 INFO [pretrained.py:267] - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FDHC0_SI1559.WAV: - sil dh ih sh uw ah l iy v iy z ih sil p r aa sil k s ih m ey dx ih sil d w uh dx iy w ih s f iy l iy w ih th ih n ih m s eh l f sil jh - - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FELC0_SI756.WAV: - sil dh ih sil t ih r ih s sil s er r ih m ih sil m aa l ih ng sil k l ey sil r eh sil d w ay sil d aa r sil b ah f sil jh - - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FMGD0_SI1564.WAV: - sil hh ae z sil b ih n iy w ah z sil b ae n ih sil b ay s sil n ey sil k eh l f eh n s ih z eh n dh eh r w er sil g r ey z ih ng sil k ae dx l sil - - - 2021-11-08 21:02:54,387 INFO [pretrained.py:269] Decoding Done - - -To decode with ``whole-lattice-rescoring`` methond, you can use - -.. code-block:: bash - - ./tdnn_lstm_ctc/pretrained.py \ - --method whole-lattice-rescoring \ - --checkpoint ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/exp/pretrained_average_16_25.pt \ - --words-file ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/data/lang_phone/words.txt \ - --HLG ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/data/lang_phone/HLG.pt \ - --G ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/data/lm/G_4_gram.pt \ - --ngram-lm-scale 0.08 \ - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FDHC0_SI1559.WAV - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FELC0_SI756.WAV - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FMGD0_SI1564.WAV - -The decoding output is: - -.. code-block:: - - 2021-11-08 20:05:22,739 INFO [pretrained.py:169] device: cuda:0 - 2021-11-08 20:05:22,739 INFO [pretrained.py:171] Creating model - 2021-11-08 20:05:26,959 INFO [pretrained.py:183] Loading HLG from ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/data/lang_phone/HLG.pt - 2021-11-08 20:05:26,971 INFO [pretrained.py:191] Loading G from ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/data/lm/G_4_gram.pt - 2021-11-08 20:05:26,977 INFO [pretrained.py:200] Constructing Fbank computer - 2021-11-08 20:05:26,978 INFO [pretrained.py:210] Reading sound files: ['./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FDHC0_SI1559.WAV', './tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FELC0_SI756.WAV', './tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FMGD0_SI1564.WAV'] - 2021-11-08 20:05:26,981 INFO [pretrained.py:216] Decoding started - 2021-11-08 20:05:27,519 INFO [pretrained.py:251] Use HLG decoding + LM rescoring - 2021-11-08 20:05:27,878 INFO [pretrained.py:267] - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FDHC0_SI1559.WAV: - sil dh ih sh uw l iy v iy z ih sil p r aa sil k s ah m ey dx ih sil w uh dx iy w ih s f iy l ih ng w ih th ih n ih m s eh l f sil jh - - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FELC0_SI756.WAV: - sil dh ih sil t ih r iy ih s sil s er r eh m ih sil n ah l ih ng sil k l ey sil r eh sil d w ay sil d aa r sil b ow f sil jh - - ./tmp-lstm/icefall_asr_timit_tdnn_lstm_ctc/test_waves/FMGD0_SI1564.WAV: - sil hh ah z sil b ih n iy w ah z sil b ae n ih sil b ay s sil n ey sil k ih l f eh n s ih z eh n dh eh r w er sil g r ey z ih n sil k ae dx l sil - - -2021-11-08 20:05:27,878 INFO [pretrained.py:269] Decoding Done - - -Colab notebook --------------- - -We provide a colab notebook for decoding with pre-trained model. - -|timit tdnn_lstm_ctc colab notebook| - -.. |timit tdnn_lstm_ctc colab notebook| image:: https://colab.research.google.com/assets/colab-badge.svg - :target: https://colab.research.google.com/drive/1Hs9DA4V96uapw_30uNp32OMJgkuR5VVd - - -**Congratulations!** You have finished the TDNN-LSTM-CTC recipe on timit in ``icefall``. From 6254deb05f09297f4edd40e5c10bd086ca761710 Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Mon, 10 Oct 2022 17:26:47 +0800 Subject: [PATCH 12/20] Delete tdnn_ligru_ctc.rst --- docs/source/recipes/timit/tdnn_ligru_ctc.rst | 406 ------------------- 1 file changed, 406 deletions(-) delete mode 100644 docs/source/recipes/timit/tdnn_ligru_ctc.rst diff --git a/docs/source/recipes/timit/tdnn_ligru_ctc.rst b/docs/source/recipes/timit/tdnn_ligru_ctc.rst deleted file mode 100644 index a553a4df72..0000000000 --- a/docs/source/recipes/timit/tdnn_ligru_ctc.rst +++ /dev/null @@ -1,406 +0,0 @@ -TDNN-LiGRU-CTC -============== - -This tutorial shows you how to run a TDNN-LiGRU-CTC model with the `TIMIT `_ dataset. - - -.. HINT:: - - We assume you have read the page :ref:`install icefall` and have setup - the environment for ``icefall``. - - -Data preparation ----------------- - -.. code-block:: bash - - $ cd egs/timit/ASR - $ ./prepare.sh - -The script ``./prepare.sh`` handles the data preparation for you, **automagically**. -All you need to do is to run it. - -The data preparation contains several stages, you can use the following two -options: - - - ``--stage`` - - ``--stop-stage`` - -to control which stage(s) should be run. By default, all stages are executed. - - -For example, - -.. code-block:: bash - - $ cd egs/timit/ASR - $ ./prepare.sh --stage 0 --stop-stage 0 - -means to run only stage 0. - -To run stage 2 to stage 5, use: - -.. code-block:: bash - - $ ./prepare.sh --stage 2 --stop-stage 5 - - -Training --------- - -Now describing the training of TDNN-LiGRU-CTC model, contained in -the `tdnn_ligru_ctc `_ -folder. - -.. HINT:: - - TIMIT is a very small dataset. So one GPU is enough. - -The command to run the training part is: - -.. code-block:: bash - - $ cd egs/timit/ASR - $ export CUDA_VISIBLE_DEVICES="0" - $ ./tdnn_ligru_ctc/train.py - -By default, it will run ``25`` epochs. Training logs and checkpoints are saved -in ``tdnn_ligru_ctc/exp``. - -In ``tdnn_ligru_ctc/exp``, you will find the following files: - - - ``epoch-0.pt``, ``epoch-1.pt``, ..., ``epoch-29.pt`` - - These are checkpoint files, containing model ``state_dict`` and optimizer ``state_dict``. - To resume training from some checkpoint, say ``epoch-10.pt``, you can use: - - .. code-block:: bash - - $ ./tdnn_ligru_ctc/train.py --start-epoch 11 - - - ``tensorboard/`` - - This folder contains TensorBoard logs. Training loss, validation loss, learning - rate, etc, are recorded in these logs. You can visualize them by: - - .. code-block:: bash - - $ cd tdnn_ligru_ctc/exp/tensorboard - $ tensorboard dev upload --logdir . --description "TDNN ligru training for timit with icefall" - - - ``log/log-train-xxxx`` - - It is the detailed training log in text format, same as the one - you saw printed to the console during training. - - -To see available training options, you can use: - -.. code-block:: bash - - $ ./tdnn_ligru_ctc/train.py --help - -Other training options, e.g., learning rate, results dir, etc., are -pre-configured in the function ``get_params()`` -in `tdnn_ligru_ctc/train.py `_. -Normally, you don't need to change them. You can change them by modifying the code, if -you want. - -Decoding --------- - -The decoding part uses checkpoints saved by the training part, so you have -to run the training part first. - -The command for decoding is: - -.. code-block:: bash - - $ export CUDA_VISIBLE_DEVICES="0" - $ ./tdnn_ligru_ctc/decode.py - -You will see the WER in the output log. - -Decoded results are saved in ``tdnn_ligru_ctc/exp``. - -.. code-block:: bash - - $ ./tdnn_ligru_ctc/decode.py --help - -shows you the available decoding options. - -Some commonly used options are: - - - ``--epoch`` - - You can select which checkpoint to be used for decoding. - For instance, ``./tdnn_ligru_ctc/decode.py --epoch 10`` means to use - ``./tdnn_ligru_ctc/exp/epoch-10.pt`` for decoding. - - - ``--avg`` - - It's related to model averaging. It specifies number of checkpoints - to be averaged. The averaged model is used for decoding. - For example, the following command: - - .. code-block:: bash - - $ ./tdnn_ligru_ctc/decode.py --epoch 25 --avg 17 - - uses the average of ``epoch-9.pt``, ``epoch-10.pt``, ``epoch-11.pt``, - ``epoch-12.pt``, ``epoch-13.pt``, ``epoch-14.pt``, ``epoch-15.pt``, - ``epoch-16.pt``, ``epoch-17.pt``, ``epoch-18.pt``, ``epoch-19.pt``, - ``epoch-20.pt``, ``epoch-21.pt``, ``epoch-22.pt``, ``epoch-23.pt``, - ``epoch-24.pt`` and ``epoch-25.pt`` - for decoding. - - - ``--export`` - - If it is ``True``, i.e., ``./tdnn_ligru_ctc/decode.py --export 1``, the code - will save the averaged model to ``tdnn_ligru_ctc/exp/pretrained.pt``. - See :ref:`tdnn_ligru_ctc use a pre-trained model` for how to use it. - - -.. _tdnn_ligru_ctc use a pre-trained model: - -Pre-trained Model ------------------ - -We have uploaded the pre-trained model to -``_. - -The following shows you how to use the pre-trained model. - - -Install kaldifeat -~~~~~~~~~~~~~~~~~ - -`kaldifeat `_ is used to -extract features for a single sound file or multiple sound files -at the same time. - -Please refer to ``_ for installation. - -Download the pre-trained model -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - $ cd egs/timit/ASR - $ mkdir tmp-ligru - $ cd tmp-ligru - $ git lfs install - $ git clone https://huggingface.co/luomingshuang/icefall_asr_timit_tdnn_ligru_ctc - -.. CAUTION:: - - You have to use ``git lfs`` to download the pre-trained model. - -.. CAUTION:: - - In order to use this pre-trained model, your k2 version has to be v1.7 or later. - -After downloading, you will have the following files: - -.. code-block:: bash - - $ cd egs/timit/ASR - $ tree tmp-ligru - -.. code-block:: bash - - tmp-ligru/ - `-- icefall_asr_timit_tdnn_ligru_ctc - |-- README.md - |-- data - | |-- lang_phone - | | |-- HLG.pt - | | |-- tokens.txt - | | `-- words.txt - | `-- lm - | `-- G_4_gram.pt - |-- exp - | `-- pretrained_average_9_25.pt - `-- test_waves - |-- FDHC0_SI1559.WAV - |-- FELC0_SI756.WAV - |-- FMGD0_SI1564.WAV - `-- trans.txt - - 6 directories, 10 files - -**File descriptions**: - - - ``data/lang_phone/HLG.pt`` - - It is the decoding graph. - - - ``data/lang_phone/tokens.txt`` - - It contains tokens and their IDs. - - - ``data/lang_phone/words.txt`` - - It contains words and their IDs. - - - ``data/lm/G_4_gram.pt`` - - It is a 4-gram LM, useful for LM rescoring. - - - ``exp/pretrained.pt`` - - It contains pre-trained model parameters, obtained by averaging - checkpoints from ``epoch-9.pt`` to ``epoch-25.pt``. - Note: We have removed optimizer ``state_dict`` to reduce file size. - - - ``test_waves/*.WAV`` - - It contains some test sound files from timit ``TEST`` dataset. - - - ``test_waves/trans.txt`` - - It contains the reference transcripts for the sound files in ``test_waves/``. - -The information of the test sound files is listed below: - -.. code-block:: bash - - $ ffprobe -show_format tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FDHC0_SI1559.WAV - - Input #0, nistsphere, from 'tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FDHC0_SI1559.WAV': - Metadata: - database_id : TIMIT - database_version: 1.0 - utterance_id : dhc0_si1559 - sample_min : -4176 - sample_max : 5984 - Duration: 00:00:03.40, bitrate: 258 kb/s - Stream #0:0: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s - - $ ffprobe -show_format tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FELC0_SI756.WAV - - Input #0, nistsphere, from 'tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FELC0_SI756.WAV': - Metadata: - database_id : TIMIT - database_version: 1.0 - utterance_id : elc0_si756 - sample_min : -1546 - sample_max : 1989 - Duration: 00:00:04.19, bitrate: 257 kb/s - Stream #0:0: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s - - $ ffprobe -show_format tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FMGD0_SI1564.WAV - - Input #0, nistsphere, from 'tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FMGD0_SI1564.WAV': - Metadata: - database_id : TIMIT - database_version: 1.0 - utterance_id : mgd0_si1564 - sample_min : -7626 - sample_max : 10573 - Duration: 00:00:04.44, bitrate: 257 kb/s - Stream #0:0: Audio: pcm_s16le, 16000 Hz, 1 channels, s16, 256 kb/s - - -Inference with a pre-trained model -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - $ cd egs/timit/ASR - $ ./tdnn_ligru_ctc/pretrained.py --help - -shows the usage information of ``./tdnn_ligru_ctc/pretrained.py``. - -To decode with ``1best`` method, we can use: - -.. code-block:: bash - - ./tdnn_ligru_ctc/pretrained.py - --method 1best - --checkpoint ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/exp/pretrained_average_9_25.pt - --words-file ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/data/lang_phone/words.txt - --HLG ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/data/lang_phone/HLG.pt - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FDHC0_SI1559.WAV - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FELC0_SI756.WAV - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FMGD0_SI1564.WAV - -The output is: - -.. code-block:: - - 2021-11-08 20:41:33,660 INFO [pretrained.py:169] device: cuda:0 - 2021-11-08 20:41:33,660 INFO [pretrained.py:171] Creating model - 2021-11-08 20:41:38,680 INFO [pretrained.py:183] Loading HLG from ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/data/lang_phone/HLG.pt - 2021-11-08 20:41:38,695 INFO [pretrained.py:200] Constructing Fbank computer - 2021-11-08 20:41:38,697 INFO [pretrained.py:210] Reading sound files: ['./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FDHC0_SI1559.WAV', './tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FELC0_SI756.WAV', './tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FMGD0_SI1564.WAV'] - 2021-11-08 20:41:38,704 INFO [pretrained.py:216] Decoding started - 2021-11-08 20:41:39,819 INFO [pretrained.py:246] Use HLG decoding - 2021-11-08 20:41:39,829 INFO [pretrained.py:267] - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FDHC0_SI1559.WAV: - sil dh ih sh uw ah l iy v iy z ih sil p r aa sil k s ih m ey dx ih sil d w uh dx ih w ih s f iy l ih ng w ih th ih n ih m s eh l f sil jh - - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FELC0_SI756.WAV: - sil m ih sil t ih r iy s sil s er r ih m ih sil m aa l ih sil k l ey sil r eh sil d w ay sil d aa r sil b ah f sil jh - - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FMGD0_SI1564.WAV: - sil hh ah z sil b ih sil g r iy w ah z sil d aw n ih sil b ay s sil n ey sil w eh l f eh n s ih z eh n dh eh r w er sil g r ey z ih ng sil k ae dx l sil - - - 2021-11-08 20:41:39,829 INFO [pretrained.py:269] Decoding Done - - -To decode with ``whole-lattice-rescoring`` methond, you can use - -.. code-block:: bash - - ./tdnn_ligru_ctc/pretrained.py \ - --method whole-lattice-rescoring \ - --checkpoint ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/exp/pretrained_average_9_25.pt \ - --words-file ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/data/lang_phone/words.txt \ - --HLG ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/data/lang_phone/HLG.pt \ - --G ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/data/lm/G_4_gram.pt \ - --ngram-lm-scale 0.1 \ - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FDHC0_SI1559.WAV - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FELC0_SI756.WAV - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FMGD0_SI1564.WAV - -The decoding output is: - -.. code-block:: - - 2021-11-08 20:37:50,693 INFO [pretrained.py:169] device: cuda:0 - 2021-11-08 20:37:50,693 INFO [pretrained.py:171] Creating model - 2021-11-08 20:37:54,693 INFO [pretrained.py:183] Loading HLG from ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/data/lang_phone/HLG.pt - 2021-11-08 20:37:54,705 INFO [pretrained.py:191] Loading G from ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/data/lm/G_4_gram.pt - 2021-11-08 20:37:54,714 INFO [pretrained.py:200] Constructing Fbank computer - 2021-11-08 20:37:54,715 INFO [pretrained.py:210] Reading sound files: ['./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FDHC0_SI1559.WAV', './tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FELC0_SI756.WAV', './tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FMGD0_SI1564.WAV'] - 2021-11-08 20:37:54,720 INFO [pretrained.py:216] Decoding started - 2021-11-08 20:37:55,808 INFO [pretrained.py:251] Use HLG decoding + LM rescoring - 2021-11-08 20:37:56,348 INFO [pretrained.py:267] - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FDHC0_SI1559.WAV: - sil dh ih sh uw ah l iy v iy z ah sil p r aa sil k s ih m ey dx ih sil d w uh dx iy w ih s f iy l iy ng w ih th ih n ih m s eh l f sil jh - - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FELC0_SI756.WAV: - sil m ih sil t ih r iy l s sil s er r eh m ih sil m aa l ih ng sil k l ey sil r eh sil d w ay sil d aa r sil b ah f sil jh ch - - ./tmp-ligru/icefall_asr_timit_tdnn_ligru_ctc/test_waves/FMGD0_SI1564.WAV: - sil hh ah z sil b ih n sil g r iy w ah z sil b aw n ih sil b ay s sil n ey sil w er l f eh n s ih z eh n dh eh r w er sil g r ey z ih ng sil k ae dx l sil - - - 2021-11-08 20:37:56,348 INFO [pretrained.py:269] Decoding Done - - -Colab notebook --------------- - -We provide a colab notebook for decoding with pre-trained model. - -|timit tdnn_ligru_ctc colab notebook| - -.. |timit tdnn_ligru_ctc colab notebook| image:: https://colab.research.google.com/assets/colab-badge.svg - :target: https://colab.research.google.com/drive/11IT-k4HQIgQngXz1uvWsEYktjqQt7Tmb - - -**Congratulations!** You have finished the TDNN-LiGRU-CTC recipe on timit in ``icefall``. From 3cc488d816f308a9b52374559748c4a7c7862e44 Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Tue, 11 Oct 2022 09:58:30 +0800 Subject: [PATCH 13/20] Delete .gitignore --- .idea/.gitignore | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .idea/.gitignore diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81b0..0000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml From 33c83e9abaedd88bf910570a776013a2a3df799e Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Tue, 11 Oct 2022 09:58:43 +0800 Subject: [PATCH 14/20] Delete icefall.iml --- .idea/icefall.iml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 .idea/icefall.iml diff --git a/.idea/icefall.iml b/.idea/icefall.iml deleted file mode 100644 index 3ed51aeda3..0000000000 --- a/.idea/icefall.iml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file From e0894c6e7cd67c9f651645e6e382ece9d164a1d7 Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Tue, 11 Oct 2022 09:58:54 +0800 Subject: [PATCH 15/20] Delete Project_Default.xml --- .idea/inspectionProfiles/Project_Default.xml | 27 -------------------- 1 file changed, 27 deletions(-) delete mode 100644 .idea/inspectionProfiles/Project_Default.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 8877b1a06d..0000000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - \ No newline at end of file From 6fb57eb8047b052a85fa84935779a4fc67b5079e Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Tue, 11 Oct 2022 09:59:03 +0800 Subject: [PATCH 16/20] Delete profiles_settings.xml --- .idea/inspectionProfiles/profiles_settings.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 105ce2da2d..0000000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file From ca05711bd2864f8a008503fa829562acac5baf49 Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Tue, 11 Oct 2022 09:59:11 +0800 Subject: [PATCH 17/20] Delete modules.xml --- .idea/modules.xml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 .idea/modules.xml diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index b33405972e..0000000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file From 95e8c353256a258d0340ddb65bf9ce424acb8f64 Mon Sep 17 00:00:00 2001 From: KajiMaCN <827272056@qq.com> Date: Tue, 11 Oct 2022 09:59:18 +0800 Subject: [PATCH 18/20] Delete vcs.xml --- .idea/vcs.xml | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 .idea/vcs.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7f4c..0000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file From 38f22fc3ea6d35b1c944023f94cd68d1eee90f79 Mon Sep 17 00:00:00 2001 From: KajiMaCN Date: Tue, 11 Oct 2022 11:11:01 +0800 Subject: [PATCH 19/20] Restore the original pathname --- .../recipes/librispeech/conformer_ctc.rst | 128 +++++++++--------- .../recipes/librispeech/tdnn_lstm_ctc.rst | 38 +++--- docs/source/recipes/timit/tdnn_ligru_ctc.rst | 2 +- docs/source/recipes/timit/tdnn_lstm_ctc.rst | 2 +- 4 files changed, 85 insertions(+), 85 deletions(-) diff --git a/docs/source/recipes/librispeech/conformer_ctc.rst b/docs/source/recipes/librispeech/conformer_ctc.rst index 3be776fc5d..4656acfd64 100644 --- a/docs/source/recipes/librispeech/conformer_ctc.rst +++ b/docs/source/recipes/librispeech/conformer_ctc.rst @@ -465,7 +465,7 @@ After downloading, you will have the following files: | `-- pretrained.pt |-- log | `-- log-decode-2021-11-09-17-38-28 - `-- test_waves + `-- test_wavs |-- 1089-134686-0001.wav |-- 1221-135766-0001.wav |-- 1221-135766-0002.wav @@ -508,21 +508,21 @@ After downloading, you will have the following files: It contains torch scripted model that can be deployed in C++. - - ``test_waves/*.wav`` + - ``test_wavs/*.wav`` It contains some test sound files from LibriSpeech ``test-clean`` dataset. - - ``test_waves/trans.txt`` + - ``test_wavs/trans.txt`` - It contains the reference transcripts for the sound files in ``test_waves/``. + It contains the reference transcripts for the sound files in ``test_wavs/``. The information of the test sound files is listed below: .. code-block:: bash - $ soxi icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/*.wav + $ soxi icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/*.wav - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav' + Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -532,7 +532,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav' + Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -542,7 +542,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav' + Input File : 'icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -586,30 +586,30 @@ The command to run CTC decoding is: --bpe-model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model \ --method ctc-decoding \ --num-classes 500 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav The output is given below: .. code-block:: - 2021-11-10 12:12:29,554 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': None, 'HLG': None, 'bpe_model': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model', 'method': 'ctc-decoding', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 12:12:29,554 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': None, 'HLG': None, 'bpe_model': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model', 'method': 'ctc-decoding', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 12:12:29,554 INFO [pretrained.py:266] device: cuda:0 2021-11-10 12:12:29,554 INFO [pretrained.py:268] Creating model 2021-11-10 12:12:35,600 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 12:12:35,601 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] + 2021-11-10 12:12:35,601 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] 2021-11-10 12:12:35,758 INFO [pretrained.py:301] Decoding started 2021-11-10 12:12:36,025 INFO [pretrained.py:319] Use CTC decoding 2021-11-10 12:12:36,204 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROFFELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED B OSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 12:12:36,204 INFO [pretrained.py:427] Decoding Done @@ -630,30 +630,30 @@ The command to run HLG decoding is: --method 1best \ --num-classes 500 \ --HLG ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav The output is given below: .. code-block:: - 2021-11-10 13:33:03,723 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': '1best', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 13:33:03,723 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': '1best', 'G': None, 'num_paths': 100, 'ngram_lm_scale': 1.3, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 13:33:03,723 INFO [pretrained.py:266] device: cuda:0 2021-11-10 13:33:03,723 INFO [pretrained.py:268] Creating model 2021-11-10 13:33:09,775 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:33:09,776 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] + 2021-11-10 13:33:09,776 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] 2021-11-10 13:33:09,881 INFO [pretrained.py:301] Decoding started 2021-11-10 13:33:09,951 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt 2021-11-10 13:33:13,234 INFO [pretrained.py:384] Use HLG decoding 2021-11-10 13:33:13,571 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 13:33:13,571 INFO [pretrained.py:427] Decoding Done @@ -678,31 +678,31 @@ The command to run HLG decoding + LM rescoring is: --HLG ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ --G ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt \ --ngram-lm-scale 1.0 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav Its output is: .. code-block:: - 2021-11-10 13:39:55,857 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'whole-lattice-rescoring', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 1.0, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-$it-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 13:39:55,857 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 0, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'whole-lattice-rescoring', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 1.0, 'attention_decoder_scale': 1.2, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-$it-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 13:39:55,858 INFO [pretrained.py:266] device: cuda:0 2021-11-10 13:39:55,858 INFO [pretrained.py:268] Creating model 2021-11-10 13:40:01,979 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:40:01,980 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] + 2021-11-10 13:40:01,980 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] 2021-11-10 13:40:02,055 INFO [pretrained.py:301] Decoding started 2021-11-10 13:40:02,117 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt 2021-11-10 13:40:05,051 INFO [pretrained.py:363] Loading G from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt 2021-11-10 13:40:18,959 INFO [pretrained.py:389] Use HLG decoding + LM rescoring 2021-11-10 13:40:19,546 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 13:40:19,546 INFO [pretrained.py:427] Decoding Done @@ -733,31 +733,31 @@ The command to run HLG decoding + LM rescoring + attention decoder rescoring is: --num-paths 100 \ --sos-id 1 \ --eos-id 1 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav The output is below: .. code-block:: - 2021-11-10 13:43:45,598 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 6, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'attention-decoder', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 2.0, 'attention_decoder_scale': 2.0, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} + 2021-11-10 13:43:45,598 INFO [pretrained.py:260] {'sample_rate': 16000, 'subsampling_factor': 4, 'vgg_frontend': False, 'use_feat_batchnorm': True, 'feature_dim': 80, 'nhead': 8, 'attention_dim': 512, 'num_decoder_layers': 6, 'search_beam': 20, 'output_beam': 8, 'min_active_states': 30, 'max_active_states': 10000, 'use_double_scores': True, 'checkpoint': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/pretrained.pt', 'words_file': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt', 'HLG': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt', 'bpe_model': None, 'method': 'attention-decoder', 'G': './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt', 'num_paths': 100, 'ngram_lm_scale': 2.0, 'attention_decoder_scale': 2.0, 'nbest_scale': 0.5, 'sos_id': 1, 'num_classes': 500, 'eos_id': 1, 'sound_files': ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'], 'env_info': {'k2-version': '1.9', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': '7178d67e594bc7fa89c2b331ad7bd1c62a6a9eb4', 'k2-git-date': 'Tue Oct 26 22:12:54 2021', 'lhotse-version': '0.11.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.1', 'python-version': '3.8', 'icefall-git-branch': 'bpe-500', 'icefall-git-sha1': '8d93169-dirty', 'icefall-git-date': 'Wed Nov 10 11:52:44 2021', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-fix', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-bpe-500/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-bpe-500/lhotse/__init__.py'}} 2021-11-10 13:43:45,599 INFO [pretrained.py:266] device: cuda:0 2021-11-10 13:43:45,599 INFO [pretrained.py:268] Creating model 2021-11-10 13:43:51,833 INFO [pretrained.py:285] Constructing Fbank computer - 2021-11-10 13:43:51,834 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav'] + 2021-11-10 13:43:51,834 INFO [pretrained.py:295] Reading sound files: ['./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav', './icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav'] 2021-11-10 13:43:51,915 INFO [pretrained.py:301] Decoding started 2021-11-10 13:43:52,076 INFO [pretrained.py:352] Loading HLG from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt 2021-11-10 13:43:55,110 INFO [pretrained.py:363] Loading G from ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt 2021-11-10 13:44:09,329 INFO [pretrained.py:397] Use HLG + LM rescoring + attention decoder rescoring 2021-11-10 13:44:10,192 INFO [pretrained.py:425] - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav: + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION 2021-11-10 13:44:10,192 INFO [pretrained.py:427] Decoding Done @@ -896,9 +896,9 @@ CTC decoding --use_gpu true \ --nn_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/cpu_jit.pt \ --bpe_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/bpe.model \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav Its output is: @@ -916,13 +916,13 @@ Its output is: 2021-11-10 13:58:02.708 [I] k2/torch/bin/ctc_decode.cu:207:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROFFELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION HLG decoding @@ -935,9 +935,9 @@ HLG decoding --nn_model ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/exp/cpu_jit.pt \ --hlg ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/HLG.pt \ --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav The output is: @@ -955,13 +955,13 @@ The output is: 2021-11-10 13:59:13.268 [I] k2/torch/bin/hlg_decode.cu:216:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION @@ -977,9 +977,9 @@ HLG decoding + n-gram LM rescoring --g ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lm/G_4_gram.pt \ --ngram_lm_scale 1.0 \ --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav The output is: @@ -1001,13 +1001,13 @@ The output is: 2021-11-10 14:01:08.68 [I] k2/torch/bin/ngram_lm_rescore.cu:242:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION @@ -1028,9 +1028,9 @@ HLG decoding + n-gram LM rescoring + attention decoder rescoring --word_table ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/data/lang_bpe_500/words.txt \ --sos_id 1 \ --eos_id 1 \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav \ - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav \ + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav The output is: @@ -1054,13 +1054,13 @@ The output is: 2021-11-10 14:02:57.179 [I] k2/torch/bin/attention_rescore.cu:369:int main(int, char**) Decoding result: - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1089-134686-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1089-134686-0001.wav AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0001.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0001.wav GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_waves/1221-135766-0002.wav + ./icefall-asr-librispeech-conformer-ctc-jit-bpe-500-2021-11-09/test_wavs/1221-135766-0002.wav YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION There is a Colab notebook showing you how to run a torch scripted model in C++. diff --git a/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst b/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst index 39541f281d..ca477fbaa3 100644 --- a/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst +++ b/docs/source/recipes/librispeech/tdnn_lstm_ctc.rst @@ -224,7 +224,7 @@ After downloading, you will have the following files: | `-- G_4_gram.pt |-- exp | `-- pretrained.pt - `-- test_waves + `-- test_wavs |-- 1089-134686-0001.flac |-- 1221-135766-0001.flac |-- 1221-135766-0002.flac @@ -268,9 +268,9 @@ The information of the test sound files is listed below: .. code-block:: bash - $ soxi tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/*.flac + $ soxi tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/*.flac - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac' + Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -280,7 +280,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit FLAC - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac' + Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -290,7 +290,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit FLAC - Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac' + Input File : 'tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -320,9 +320,9 @@ To decode with ``1best`` method, we can use: --checkpoint ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/exp/pretraind.pt \ --words-file ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/words.txt \ --HLG ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac The output is: @@ -332,17 +332,17 @@ The output is: 2021-08-24 16:57:13,315 INFO [pretrained.py:170] Creating model 2021-08-24 16:57:18,331 INFO [pretrained.py:182] Loading HLG from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt 2021-08-24 16:57:27,581 INFO [pretrained.py:199] Constructing Fbank computer - 2021-08-24 16:57:27,584 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac'] + 2021-08-24 16:57:27,584 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac'] 2021-08-24 16:57:27,599 INFO [pretrained.py:215] Decoding started 2021-08-24 16:57:27,791 INFO [pretrained.py:245] Use HLG decoding 2021-08-24 16:57:28,098 INFO [pretrained.py:266] - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION @@ -360,9 +360,9 @@ To decode with ``whole-lattice-rescoring`` methond, you can use --method whole-lattice-rescoring \ --G ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lm/G_4_gram.pt \ --ngram-lm-scale 0.8 \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac \ - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac \ + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac The decoding output is: @@ -373,17 +373,17 @@ The decoding output is: 2021-08-24 16:39:29,403 INFO [pretrained.py:182] Loading HLG from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lang_phone/HLG.pt 2021-08-24 16:39:40,631 INFO [pretrained.py:190] Loading G from ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/data/lm/G_4_gram.pt 2021-08-24 16:39:53,098 INFO [pretrained.py:199] Constructing Fbank computer - 2021-08-24 16:39:53,107 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac'] + 2021-08-24 16:39:53,107 INFO [pretrained.py:209] Reading sound files: ['./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac', './tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac'] 2021-08-24 16:39:53,121 INFO [pretrained.py:215] Decoding started 2021-08-24 16:39:53,443 INFO [pretrained.py:250] Use HLG decoding + LM rescoring 2021-08-24 16:39:54,010 INFO [pretrained.py:266] - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1089-134686-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1089-134686-0001.flac: AFTER EARLY NIGHTFALL THE YELLOW LAMPS WOULD LIGHT UP HERE AND THERE THE SQUALID QUARTER OF THE BROTHELS - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0001.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0001.flac: GOD AS A DIRECT CONSEQUENCE OF THE SIN WHICH MAN THUS PUNISHED HAD GIVEN HER A LOVELY CHILD WHOSE PLACE WAS ON THAT SAME DISHONORED BOSOM TO CONNECT HER PARENT FOREVER WITH THE RACE AND DESCENT OF MORTALS AND TO BE FINALLY A BLESSED SOUL IN HEAVEN - ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_waves/1221-135766-0002.flac: + ./tmp/icefall_asr_librispeech_tdnn-lstm_ctc/test_wavs/1221-135766-0002.flac: YET THESE THOUGHTS AFFECTED HESTER PRYNNE LESS WITH HOPE THAN APPREHENSION diff --git a/docs/source/recipes/timit/tdnn_ligru_ctc.rst b/docs/source/recipes/timit/tdnn_ligru_ctc.rst index a553a4df72..186420ee7c 100644 --- a/docs/source/recipes/timit/tdnn_ligru_ctc.rst +++ b/docs/source/recipes/timit/tdnn_ligru_ctc.rst @@ -222,7 +222,7 @@ After downloading, you will have the following files: | `-- G_4_gram.pt |-- exp | `-- pretrained_average_9_25.pt - `-- test_waves + `-- test_wavs |-- FDHC0_SI1559.WAV |-- FELC0_SI756.WAV |-- FMGD0_SI1564.WAV diff --git a/docs/source/recipes/timit/tdnn_lstm_ctc.rst b/docs/source/recipes/timit/tdnn_lstm_ctc.rst index 4abaddeca5..6f760a9ce6 100644 --- a/docs/source/recipes/timit/tdnn_lstm_ctc.rst +++ b/docs/source/recipes/timit/tdnn_lstm_ctc.rst @@ -220,7 +220,7 @@ After downloading, you will have the following files: | `-- G_4_gram.pt |-- exp | `-- pretrained_average_16_25.pt - `-- test_waves + `-- test_wavs |-- FDHC0_SI1559.WAV |-- FELC0_SI756.WAV |-- FMGD0_SI1564.WAV From 8f71e7ee60e6e011a122a24bef07a332f94ea6f5 Mon Sep 17 00:00:00 2001 From: KajiMaCN Date: Tue, 11 Oct 2022 12:18:32 +0800 Subject: [PATCH 20/20] Restore the original pathname --- .../recipes/aishell/stateless_transducer.rst | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/docs/source/recipes/aishell/stateless_transducer.rst b/docs/source/recipes/aishell/stateless_transducer.rst index eb87af916d..e8137b8c12 100644 --- a/docs/source/recipes/aishell/stateless_transducer.rst +++ b/docs/source/recipes/aishell/stateless_transducer.rst @@ -481,7 +481,7 @@ After downloading, you will have the following files: | |-- log-decode-epoch-64-avg-33-context-2-max-sym-per-frame-1-2022-02-28-18-13-07 | |-- recogs-test-beam_4-epoch-64-avg-33-beam-4.txt | `-- recogs-test-greedy_search-epoch-64-avg-33-context-2-max-sym-per-frame-1.txt - `-- test_waves + `-- test_wavs |-- BAC009S0764W0121.wav |-- BAC009S0764W0122.wav |-- BAC009S0764W0123.wav @@ -506,7 +506,7 @@ After downloading, you will have the following files: It contains decoding logs and decoded results. - - ``test_waves`` + - ``test_wavs`` It contains some test sound files from Aishell ``test`` dataset. @@ -514,9 +514,9 @@ The information of the test sound files is listed below: .. code-block:: bash - $ soxi tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/*.wav + $ soxi tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/*.wav - Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav' + Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -526,7 +526,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav' + Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -536,7 +536,7 @@ The information of the test sound files is listed below: Sample Encoding: 16-bit Signed Integer PCM - Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav' + Input File : 'tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav' Channels : 1 Sample Rate : 16000 Precision : 16-bit @@ -583,9 +583,9 @@ The command to run greedy search is given below: --checkpoint ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt \ --lang-dir ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char \ --method greedy_search \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav The output is as follows: @@ -593,21 +593,21 @@ The output is as follows: 2022-03-03 15:35:26,531 INFO [pretrained.py:239] device: cuda:0 2022-03-03 15:35:26,994 INFO [lexicon.py:176] Loading pre-compiled tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char/Linv.pt - 2022-03-03 15:35:27,027 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'greedy_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} + 2022-03-03 15:35:27,027 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'greedy_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} 2022-03-03 15:35:27,027 INFO [pretrained.py:248] About to create model 2022-03-03 15:35:36,878 INFO [pretrained.py:257] Constructing Fbank computer - 2022-03-03 15:35:36,880 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'] + 2022-03-03 15:35:36,880 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'] 2022-03-03 15:35:36,891 INFO [pretrained.py:273] Decoding started /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/conformer.py:113: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). lengths = ((x_lens - 1) // 2 - 1) // 2 2022-03-03 15:35:37,163 INFO [pretrained.py:320] - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav: 甚 至 出 现 交 易 几 乎 停 滞 的 情 况 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav: 一 二 线 城 市 虽 然 也 处 于 调 整 中 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav: 但 因 为 聚 集 了 过 多 公 共 资 源 2022-03-03 15:35:37,163 INFO [pretrained.py:322] Decoding Done @@ -627,9 +627,9 @@ The command to run beam search is given below: --lang-dir ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char \ --method beam_search \ --beam-size 4 \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav The output is as follows: @@ -637,21 +637,21 @@ The output is as follows: 2022-03-03 15:39:09,285 INFO [pretrained.py:239] device: cuda:0 2022-03-03 15:39:09,708 INFO [lexicon.py:176] Loading pre-compiled tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char/Linv.pt - 2022-03-03 15:39:09,759 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} + 2022-03-03 15:39:09,759 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} 2022-03-03 15:39:09,760 INFO [pretrained.py:248] About to create model 2022-03-03 15:39:18,919 INFO [pretrained.py:257] Constructing Fbank computer - 2022-03-03 15:39:18,922 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'] + 2022-03-03 15:39:18,922 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'] 2022-03-03 15:39:18,929 INFO [pretrained.py:273] Decoding started /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/conformer.py:113: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). lengths = ((x_lens - 1) // 2 - 1) // 2 2022-03-03 15:39:21,046 INFO [pretrained.py:320] - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav: 甚 至 出 现 交 易 几 乎 停 滞 的 情 况 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav: 一 二 线 城 市 虽 然 也 处 于 调 整 中 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav: 但 因 为 聚 集 了 过 多 公 共 资 源 2022-03-03 15:39:21,047 INFO [pretrained.py:322] Decoding Done @@ -671,9 +671,9 @@ The command to run modified beam search is given below: --lang-dir ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char \ --method modified_beam_search \ --beam-size 4 \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav \ - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav \ + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav The output is as follows: @@ -681,23 +681,23 @@ The output is as follows: 2022-03-03 15:41:23,319 INFO [pretrained.py:239] device: cuda:0 2022-03-03 15:41:23,798 INFO [lexicon.py:176] Loading pre-compiled tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char/Linv.pt - 2022-03-03 15:41:23,831 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'modified_beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} + 2022-03-03 15:41:23,831 INFO [pretrained.py:246] {'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, 'env_info': {'k2-version': '1.13', 'k2-build-type': 'Release', 'k2-with-cuda': True, 'k2-git-sha1': 'f4fefe4882bc0ae59af951da3f47335d5495ef71', 'k2-git-date': 'Thu Feb 10 15:16:02 2022', 'lhotse-version': '1.0.0.dev+missing.version.file', 'torch-cuda-available': True, 'torch-cuda-version': '10.2', 'python-version': '3.8', 'icefall-git-branch': 'master', 'icefall-git-sha1': '50d2281-clean', 'icefall-git-date': 'Wed Mar 2 16:02:38 2022', 'icefall-path': '/ceph-fj/fangjun/open-source-2/icefall-aishell', 'k2-path': '/ceph-fj/fangjun/open-source-2/k2-multi-datasets/k2/python/k2/__init__.py', 'lhotse-path': '/ceph-fj/fangjun/open-source-2/lhotse-aishell/lhotse/__init__.py', 'hostname': 'de-74279-k2-train-2-0815224919-75d558775b-mmnv8', 'IP address': '10.177.72.138'}, 'sample_rate': 16000, 'checkpoint': './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/exp/pretrained.pt', 'lang_dir': PosixPath('tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/data/lang_char'), 'method': 'modified_beam_search', 'sound_files': ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'], 'beam_size': 4, 'context_size': 2, 'max_sym_per_frame': 3, 'blank_id': 0, 'vocab_size': 4336} 2022-03-03 15:41:23,831 INFO [pretrained.py:248] About to create model 2022-03-03 15:41:32,214 INFO [pretrained.py:257] Constructing Fbank computer - 2022-03-03 15:41:32,215 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav'] + 2022-03-03 15:41:32,215 INFO [pretrained.py:267] Reading sound files: ['./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav', './tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav'] 2022-03-03 15:41:32,220 INFO [pretrained.py:273] Decoding started /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/conformer.py:113: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). lengths = ((x_lens - 1) // 2 - 1) // 2 /ceph-fj/fangjun/open-source-2/icefall-aishell/egs/aishell/ASR/transducer_stateless_modified/beam_search.py:402: UserWarning: __floordiv__ is deprecated, and its behavior will change in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). topk_hyp_indexes = topk_indexes // logits.size(-1) 2022-03-03 15:41:32,583 INFO [pretrained.py:320] - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0121.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0121.wav: 甚 至 出 现 交 易 几 乎 停 滞 的 情 况 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0122.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0122.wav: 一 二 线 城 市 虽 然 也 处 于 调 整 中 - ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_waves/BAC009S0764W0123.wav: + ./tmp/icefall-aishell-transducer-stateless-modified-2022-03-01/test_wavs/BAC009S0764W0123.wav: 但 因 为 聚 集 了 过 多 公 共 资 源 2022-03-03 15:41:32,583 INFO [pretrained.py:322] Decoding Done