From b138a41e26c47e32a0212973c639a78743752433 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Thu, 10 Mar 2022 14:56:23 +0000 Subject: [PATCH 01/22] add path to db --- egs2/TEMPLATE/asr1/db.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/egs2/TEMPLATE/asr1/db.sh b/egs2/TEMPLATE/asr1/db.sh index 3785aef57a8..b0d2b9ccb8f 100755 --- a/egs2/TEMPLATE/asr1/db.sh +++ b/egs2/TEMPLATE/asr1/db.sh @@ -126,6 +126,7 @@ PRIMEWORDS_CHINESE=downloads SEAME= BENGALI=downloads IWSLT14= +ST_CMDS=downloads # For only CMU TIR environment if [[ "$(hostname)" == tir* ]]; then From 11bbacbde827cf51cbe916f3126b8ea796d8fedb Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Thu, 10 Mar 2022 14:57:35 +0000 Subject: [PATCH 02/22] initial commit --- egs2/zh_openslr38/asr1/README.md | 179 ++++++++++++++++++ egs2/zh_openslr38/asr1/asr.sh | 1 + egs2/zh_openslr38/asr1/cmd.sh | 110 +++++++++++ .../asr1/conf/decode_asr_rnn.yaml | 6 + .../asr1/conf/decode_asr_simu_streaming.yaml | 7 + .../asr1/conf/decode_asr_streaming.yaml | 11 ++ .../asr1/conf/decode_asr_transformer.yaml | 6 + .../conf/decode_asr_transformer_ngram.yaml | 7 + egs2/zh_openslr38/asr1/conf/fbank.conf | 2 + egs2/zh_openslr38/asr1/conf/pbs.conf | 11 ++ egs2/zh_openslr38/asr1/conf/pitch.conf | 1 + egs2/zh_openslr38/asr1/conf/queue.conf | 12 ++ egs2/zh_openslr38/asr1/conf/slurm.conf | 14 ++ .../asr1/conf/train_asr_conformer.yaml | 1 + .../zh_openslr38/asr1/conf/train_asr_rnn.yaml | 55 ++++++ .../conf/train_asr_streaming_conformer.yaml | 95 ++++++++++ .../conf/train_asr_streaming_transformer.yaml | 76 ++++++++ .../asr1/conf/train_asr_transformer.yaml | 1 + egs2/zh_openslr38/asr1/conf/train_lm.yaml | 19 ++ .../asr1/conf/train_lm_transformer.yaml | 1 + .../asr1/conf/tuning/train_asr_conformer.yaml | 76 ++++++++ .../conf/tuning/train_asr_transformer.yaml | 66 +++++++ .../conf/tuning/train_asr_transformer2.yaml | 54 ++++++ .../conf/tuning/train_asr_transformer3.yaml | 70 +++++++ .../tuning/train_asr_transformer_lr0.002.yaml | 66 +++++++ .../asr1/conf/tuning/train_lm_rnn.yaml | 19 ++ .../asr1/conf/tuning/train_lm_rnn2.yaml | 19 ++ .../conf/tuning/train_lm_transformer.yaml | 29 +++ egs2/zh_openslr38/asr1/db.sh | 1 + egs2/zh_openslr38/asr1/local/data.sh | 85 +++++++++ egs2/zh_openslr38/asr1/local/data_download.sh | 50 +++++ egs2/zh_openslr38/asr1/local/data_split.py | 97 ++++++++++ .../asr1/local/download_and_untar.sh | 1 + egs2/zh_openslr38/asr1/local/path.sh | 1 + egs2/zh_openslr38/asr1/path.sh | 1 + egs2/zh_openslr38/asr1/pyscripts | 1 + egs2/zh_openslr38/asr1/run.sh | 40 ++++ egs2/zh_openslr38/asr1/run_streaming.sh | 41 ++++ egs2/zh_openslr38/asr1/scripts | 1 + egs2/zh_openslr38/asr1/steps | 1 + egs2/zh_openslr38/asr1/utils | 1 + 41 files changed, 1335 insertions(+) create mode 100644 egs2/zh_openslr38/asr1/README.md create mode 120000 egs2/zh_openslr38/asr1/asr.sh create mode 100644 egs2/zh_openslr38/asr1/cmd.sh create mode 100644 egs2/zh_openslr38/asr1/conf/decode_asr_rnn.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/decode_asr_simu_streaming.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/decode_asr_streaming.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/decode_asr_transformer.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/decode_asr_transformer_ngram.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/fbank.conf create mode 100644 egs2/zh_openslr38/asr1/conf/pbs.conf create mode 100644 egs2/zh_openslr38/asr1/conf/pitch.conf create mode 100644 egs2/zh_openslr38/asr1/conf/queue.conf create mode 100644 egs2/zh_openslr38/asr1/conf/slurm.conf create mode 120000 egs2/zh_openslr38/asr1/conf/train_asr_conformer.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/train_asr_rnn.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/train_asr_streaming_conformer.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/train_asr_streaming_transformer.yaml create mode 120000 egs2/zh_openslr38/asr1/conf/train_asr_transformer.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/train_lm.yaml create mode 120000 egs2/zh_openslr38/asr1/conf/train_lm_transformer.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/tuning/train_asr_conformer.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/tuning/train_asr_transformer.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/tuning/train_asr_transformer2.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/tuning/train_asr_transformer3.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/tuning/train_asr_transformer_lr0.002.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/tuning/train_lm_rnn.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/tuning/train_lm_rnn2.yaml create mode 100644 egs2/zh_openslr38/asr1/conf/tuning/train_lm_transformer.yaml create mode 120000 egs2/zh_openslr38/asr1/db.sh create mode 100755 egs2/zh_openslr38/asr1/local/data.sh create mode 100755 egs2/zh_openslr38/asr1/local/data_download.sh create mode 100644 egs2/zh_openslr38/asr1/local/data_split.py create mode 120000 egs2/zh_openslr38/asr1/local/download_and_untar.sh create mode 100755 egs2/zh_openslr38/asr1/local/path.sh create mode 120000 egs2/zh_openslr38/asr1/path.sh create mode 120000 egs2/zh_openslr38/asr1/pyscripts create mode 100755 egs2/zh_openslr38/asr1/run.sh create mode 100755 egs2/zh_openslr38/asr1/run_streaming.sh create mode 120000 egs2/zh_openslr38/asr1/scripts create mode 120000 egs2/zh_openslr38/asr1/steps create mode 120000 egs2/zh_openslr38/asr1/utils diff --git a/egs2/zh_openslr38/asr1/README.md b/egs2/zh_openslr38/asr1/README.md new file mode 100644 index 00000000000..985604c1a43 --- /dev/null +++ b/egs2/zh_openslr38/asr1/README.md @@ -0,0 +1,179 @@ +# Streaming Conformer + specaug + speed perturbation: feats=raw, n_fft=512, hop_length=128 +## Environments +- date: `Mon Aug 23 16:31:48 CST 2021` +- python version: `3.7.9 (default, Aug 31 2020, 12:42:55) [GCC 7.3.0]` +- espnet version: `espnet 0.9.9` +- pytorch version: `pytorch 1.5.0` +- Git hash: `b94d07028099a80c9c690341981ae7d550b5ca24` + - Commit date: `Mon Aug 23 00:47:47 2021 +0800` + +## With Transformer LM +- Model link: (wait for upload) +- ASR config: [./conf/train_asr_streaming_cpnformer.yaml](./conf/train_asr_streaming_conformer.yaml) +- LM config: [./conf/tuning/train_lm_transformer.yaml](./conf/tuning/train_lm_transformer.yaml) + +### CER + +|dataset|Snt|Wrd|Corr|Sub|Del|Ins|Err|S.Err| +|---|---|---|---|---|---|---|---|---| +|decode_asr_streaming_lm_lm_train_lm_transformer_zh_char_valid.loss.ave_asr_model_valid.acc.ave/dev|14326|205341|94.0|5.8|0.3|0.3|6.3|42.2| +|decode_asr_streaming_lm_lm_train_lm_transformer_zh_char_valid.loss.ave_asr_model_valid.acc.ave/test|7176|104765|92.9|6.7|0.5|0.7|7.8|46.2| +# Streaming Transformer + speed perturbation: feats=raw, n_fft=512, hop_length=128 +## Environments +- date: `Tue Aug 17 01:20:32 CST 2021` +- python version: `3.7.9 (default, Aug 31 2020, 12:42:55) [GCC 7.3.0]` +- espnet version: `espnet 0.9.9` +- pytorch version: `pytorch 1.5.0` +- Git hash: `6f5f848e0a9bfca1b73393779233bde34add3df1` + - Commit date: `Mon Aug 16 21:50:08 2021 +0800` + +## With Transformer LM +- Model link: (wait for upload) +- ASR config: [./conf/train_asr_streaming_transformer.yaml](./conf/train_asr_streaming_transformer.yaml) +- LM config: [./conf/tuning/train_lm_transformer.yaml](./conf/tuning/train_lm_transformer.yaml) + +### CER + +|dataset|Snt|Wrd|Corr|Sub|Del|Ins|Err|S.Err| +|---|---|---|---|---|---|---|---|---| +|decode_asr_streaming_lm_lm_train_lm_transformer_zh_char_valid.loss.ave_asr_model_valid.acc.ave/dev|14326|205341|93.6|6.2|0.1|0.5|6.8|46.8| +|decode_asr_streaming_lm_lm_train_lm_transformer_zh_char_valid.loss.ave_asr_model_valid.acc.ave/test|7176|104765|93.0|6.7|0.2|0.8|7.8|50.7| + +# Conformer + specaug + speed perturbation: feats=raw, n_fft=512, hop_length=128 +## Environments +- date: `Fri Oct 16 11:10:17 JST 2020` +- python version: `3.7.3 (default, Mar 27 2019, 22:11:17) [GCC 7.3.0]` +- espnet version: `espnet 0.9.0` +- pytorch version: `pytorch 1.6.0` +- Git hash: `20b0c89369d9dd3e05780b65fdd00a9b4f4891e5` + - Commit date: `Mon Oct 12 09:28:20 2020 -0400` + +## With Transformer LM +- Model link: https://zenodo.org/record/4105763#.X40xe2j7QUE +- ASR config: [./conf/tuning/train_asr_conformer.yaml](./conf/tuning/train_asr_conformer.yaml) +- LM config: [./conf/tuning/train_lm_transformer.yaml](./conf/tuning/train_lm_transformer.yaml) + +### CER + +|dataset|Snt|Wrd|Corr|Sub|Del|Ins|Err|S.Err| +|---|---|---|---|---|---|---|---|---| +|decode_asr_rnn_lm_lm_train_lm_transformer_char_batch_bins2000000_valid.loss.ave_asr_model_valid.acc.ave/dev|14326|205341|95.7|4.2|0.1|0.1|4.4|33.7| +|decode_asr_rnn_lm_lm_train_lm_transformer_char_batch_bins2000000_valid.loss.ave_asr_model_valid.acc.ave/test|7176|104765|95.4|4.5|0.1|0.1|4.7|35.0| + +## With RNN LM +- ASR config: [./conf/tuning/train_asr_conformer.yaml](./conf/tuning/train_asr_conformer.yaml) +- LM config: [./conf/tuning/train_lm_rnn2.yaml](./conf/tuning/train_lm_rnn2.yaml) + +### CER + +|dataset|Snt|Wrd|Corr|Sub|Del|Ins|Err|S.Err| +|---|---|---|---|---|---|---|---|---| +|decode_asr_rnn_lm_lm_train_lm_char_valid.loss.ave_asr_model_valid.acc.ave/dev|14326|205341|95.5|4.4|0.1|0.1|4.6|35.2| +|decode_asr_rnn_lm_lm_train_lm_char_valid.loss.ave_asr_model_valid.acc.ave/test|7176|104765|95.2|4.7|0.1|0.1|4.9|36.5| + +## Without LM +- ASR config: [./conf/tuning/train_asr_conformer.yaml](./conf/tuning/train_asr_conformer.yaml) + +### CER + +|dataset|Snt|Wrd|Corr|Sub|Del|Ins|Err|S.Err| +|---|---|---|---|---|---|---|---|---| +|decode_asr_rnn_asr_model_valid.acc.ave/dev|14326|205341|95.6|4.3|0.1|0.1|4.5|35.0| +|decode_asr_rnn_asr_model_valid.acc.ave/test|7176|104765|95.2|4.7|0.1|0.1|4.9|36.7| + +# Transformer + speed perturbation: feats=raw with same LM with the privious setting + +I compared between `n_fft=512, hop_length=128`, `n_fft=400, hop_length=160`, and `n_fft=512, hop_length=256` +with searching the best `batch_bins` to get the suitable configuration for each hop_length. + +## Environments +- date: `Fri Oct 16 11:10:17 JST 2020` +- python version: `3.7.3 (default, Mar 27 2019, 22:11:17) [GCC 7.3.0]` +- espnet version: `espnet 0.9.0` +- pytorch version: `pytorch 1.6.0` +- Git hash: `20b0c89369d9dd3e05780b65fdd00a9b4f4891e5` + - Commit date: `Mon Oct 12 09:28:20 2020 -0400` + +## n_fft=512, hop_length=128 +asr_train_asr_transformer2_raw_char_batch_typenumel_batch_bins8500000_optim_conflr0.0005_scheduler_confwarmup_steps30000_sp + +- ASR config: [./conf/tuning/train_asr_transformer3.yaml](./conf/tuning/train_asr_transformer3.yaml) +- LM config: [./conf/tuning/train_lm_rnn2.yaml](./conf/tuning/train_lm_rnn2.yaml) + + +### CER + +|dataset|Snt|Wrd|Corr|Sub|Del|Ins|Err|S.Err| +|---|---|---|---|---|---|---|---|---| +|decode_asr_rnn_lm_lm_train_lm_char_valid.loss.ave_asr_model_valid.acc.ave/dev|14326|205341|94.2|5.7|0.1|0.1|5.9|42.6| +|decode_asr_rnn_lm_lm_train_lm_char_valid.loss.ave_asr_model_valid.acc.ave/test|7176|104765|93.7|6.1|0.2|0.1|6.4|45.0| + + +## n_fft=400, hop_length=160 +asr_train_asr_transformer2_raw_char_frontend_confn_fft400_frontend_confhop_length160_batch_typenumel_batch_bins6500000_optim_conflr0.0005_scheduler_confwarmup_steps30000_sp + +### CER + +|dataset|Snt|Wrd|Corr|Sub|Del|Ins|Err|S.Err| +|---|---|---|---|---|---|---|---|---| +|decode_asr_rnn_lm_lm_train_lm_char_valid.loss.ave_asr_model_valid.acc.ave/dev|14326|205341|94.1|5.7|0.1|0.1|6.0|43.0| +|decode_asr_rnn_lm_lm_train_lm_char_valid.loss.ave_asr_model_valid.acc.ave/test|7176|104765|93.5|6.3|0.2|0.1|6.6|45.4| + +## n_fft=512, hop_length=256 +asr_train_asr_transformer2_raw_char_frontend_confn_fft512_frontend_confhop_length256_batch_typenumel_batch_bins6000000_sp + +### CER + +|dataset|Snt|Wrd|Corr|Sub|Del|Ins|Err|S.Err| +|---|---|---|---|---|---|---|---|---| +|decode_asr_rnn_lm_lm_train_lm_char_valid.loss.ave_asr_model_valid.acc.ave/dev|14326|205341|94.0|5.9|0.1|0.1|6.1|43.5| +|decode_asr_rnn_lm_lm_train_lm_char_valid.loss.ave_asr_model_valid.acc.ave/test|7176|104765|93.3|6.5|0.2|0.1|6.8|45.8| + + +# Transformer + speed perturbation: feats=fbank_pitch, RNN-LM +Compatible setting with espnet1 to reproduce the previou result + +## Environments +- date: `Fri Oct 16 11:10:17 JST 2020` +- python version: `3.7.3 (default, Mar 27 2019, 22:11:17) [GCC 7.3.0]` +- espnet version: `espnet 0.9.0` +- pytorch version: `pytorch 1.6.0` +- Git hash: `20b0c89369d9dd3e05780b65fdd00a9b4f4891e5` + - Commit date: `Mon Oct 12 09:28:20 2020 -0400` + +- ASR config: [./conf/tuning/train_asr_transformer2.yaml](./conf/tuning/train_asr_transformer2.yaml) +- LM config: [./conf/tuning/train_lm_rnn2.yaml](./conf/tuning/train_lm_rnn2.yaml) + +## asr_train_asr_transformer2_fbank_pitch_char_sp +### CER + +|dataset|Snt|Wrd|Corr|Sub|Del|Ins|Err|S.Err| +|---|---|---|---|---|---|---|---|---| +|decode_asr_rnn_lm_lm_train_lm_char_valid.loss.ave_asr_model_valid.acc.ave/dev|14326|205341|94.0|5.9|0.1|0.1|6.1|43.4| +|decode_asr_rnn_lm_lm_train_lm_char_valid.loss.ave_asr_model_valid.acc.ave/test|7176|104765|93.4|6.4|0.2|0.1|6.7|45.9| + +# The first result +## Environments +- date: `Sun Feb 2 02:03:55 CST 2020` +- python version: `3.7.3 (default, Mar 27 2019, 22:11:17) [GCC 7.3.0]` +- espnet version: `espnet 0.6.0` +- pytorch version: `pytorch 1.1.0` +- Git hash: `e0fd073a70bcded6a0e6a3587630410a994ccdb8` (+ fixing https://github.com/espnet/espnet/pull/1533) + - Commit date: `Sat Jan 11 06:09:24 2020 +0900` + +## asr_train_asr_rnn_new_fbank_pitch_char +### CER + +|dataset|Snt|Wrd|Corr|Sub|Del|Ins|Err|S.Err| +|---|---|---|---|---|---|---|---|---| +|decode_devdecode_asr_rnn_lm_valid.loss.best_asr_model_valid.acc.best|14326|205341|92.6|7.2|0.2|0.1|7.5|49.6| +|decode_testdecode_asr_rnn_lm_valid.loss.best_asr_model_valid.acc.best|7176|104765|91.6|8.2|0.3|0.2|8.6|53.4| + +## asr_train_asr_transformer_lr0.002_fbank_pitch_char +### CER + +|dataset|Snt|Wrd|Corr|Sub|Del|Ins|Err|S.Err| +|---|---|---|---|---|---|---|---|---| +|decode_dev_decode_asr_rnn_lm_train_lm_char_valid.loss.best_asr_model_valid.acc.best|14326|205341|93.3|6.5|0.2|0.1|6.8|45.6| +|decode_test_decode_asr_rnn_lm_train_lm_char_valid.loss.best_asr_model_valid.acc.best|7176|104765|92.7|7.1|0.3|0.1|7.4|47.6| + diff --git a/egs2/zh_openslr38/asr1/asr.sh b/egs2/zh_openslr38/asr1/asr.sh new file mode 120000 index 00000000000..60b05122cfd --- /dev/null +++ b/egs2/zh_openslr38/asr1/asr.sh @@ -0,0 +1 @@ +../../TEMPLATE/asr1/asr.sh \ No newline at end of file diff --git a/egs2/zh_openslr38/asr1/cmd.sh b/egs2/zh_openslr38/asr1/cmd.sh new file mode 100644 index 00000000000..2aae6919fef --- /dev/null +++ b/egs2/zh_openslr38/asr1/cmd.sh @@ -0,0 +1,110 @@ +# ====== About run.pl, queue.pl, slurm.pl, and ssh.pl ====== +# Usage: .pl [options] JOB=1: +# e.g. +# run.pl --mem 4G JOB=1:10 echo.JOB.log echo JOB +# +# Options: +# --time