From fabb3a1fd17b10cbcf252240e0c40243a8c2f971 Mon Sep 17 00:00:00 2001 From: D-Keqi <61508571+D-Keqi@users.noreply.github.com> Date: Tue, 19 Apr 2022 16:39:39 +0800 Subject: [PATCH] update the test_integration_espnet2 --- ci/test_integration_espnet2.sh | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/ci/test_integration_espnet2.sh b/ci/test_integration_espnet2.sh index 78086272af7..ac664494a6d 100755 --- a/ci/test_integration_espnet2.sh +++ b/ci/test_integration_espnet2.sh @@ -100,6 +100,40 @@ if python3 -c "import fairseq" &> /dev/null; then cd "${cwd}" fi +# [ESPnet2] test st recipe +cd ./egs2/mini_an4/st1 +echo "==== [ESPnet2] ST ===" +./run.sh --stage 1 --stop-stage 1 +feats_types="raw fbank_pitch" +token_types="bpe char" +for t in ${feats_types}; do + ./run.sh --stage 2 --stop-stage 4 --feats-type "${t}" --python "${python}" +done +for t in ${token_types}; do + ./run.sh --stage 5 --stop-stage 5 --token-type "${t}" --python "${python}" +done +for t in ${feats_types}; do + for t2 in ${token_types}; do + echo "==== feats_type=${t}, token_types=${t2} ===" + ./run.sh --ngpu 0 --stage 6 --stop-stage 13 --skip-upload false --feats-type "${t}" --token-type "${t2}" \ + --asr-args "--max_epoch=1" --lm-args "--max_epoch=1" --python "${python}" + done +done +echo "==== feats_type=raw, token_types=bpe, model_conf.extract_feats_in_collect_stats=False, normalize=utt_mvn ===" +./run.sh --ngpu 0 --stage 10 --stop-stage 13 --skip-upload false --feats-type "raw" --token-type "bpe" \ + --feats_normalize "utterance_mvn" --lm-args "--max_epoch=1" --python "${python}" \ + --asr-args "--model_conf extract_feats_in_collect_stats=false --max_epoch=1" + +echo "==== use_streaming, feats_type=raw, token_types=bpe, model_conf.extract_feats_in_collect_stats=False, normalize=utt_mvn ===" +./run.sh --use_streaming true --ngpu 0 --stage 6 --stop-stage 13 --skip-upload false --feats-type "raw" --token-type "bpe" \ + --feats_normalize "utterance_mvn" --lm-args "--max_epoch=1" --python "${python}" \ + --asr-args "--model_conf extract_feats_in_collect_stats=false --max_epoch=1 --encoder=contextual_block_transformer --decoder=transformer + --encoder_conf block_size=40 --encoder_conf hop_size=16 --encoder_conf look_ahead=16" + +# Remove generated files in order to reduce the disk usage +rm -rf exp dump data +cd "${cwd}" + # [ESPnet2] Validate configuration files echo "" > dummy_token_list echo "==== [ESPnet2] Validation configuration files ===" @@ -124,6 +158,9 @@ if python3 -c 'import torch as t; from distutils.version import LooseVersion as for f in egs2/*/ssl1/conf/train*.yaml; do ${python} -m espnet2.bin.hubert_train --config "${f}" --iterator_type none --normalize none --dry_run true --output_dir out --token_list dummy_token_list done + for f in egs2/*/st1/conf/train_st*.yaml; do + ${python} -m espnet2.bin.st_train --config "${f}" --iterator_type none --dry_run true --output_dir out --token_list dummy_token_list --src_token_list dummy_token_list + done fi # These files must be same each other.