diff --git a/examples/aishell/asr0/local/test_hub.sh b/examples/aishell/asr0/local/test_wav.sh similarity index 95% rename from examples/aishell/asr0/local/test_hub.sh rename to examples/aishell/asr0/local/test_wav.sh index f9fc457500ff60c0752a2d4616e9993640ff02ee..4a6d92fbe1be25960dcd58293682ca43cabe4cad 100755 --- a/examples/aishell/asr0/local/test_hub.sh +++ b/examples/aishell/asr0/local/test_wav.sh @@ -30,7 +30,7 @@ if [ $? -ne 0 ]; then exit 1 fi -python3 -u ${BIN_DIR}/test_hub.py \ +python3 -u ${BIN_DIR}/test_wav.py \ --ngpu ${ngpu} \ --config ${config_path} \ --result_file ${ckpt_prefix}.rsl \ diff --git a/examples/aishell/asr0/run.sh b/examples/aishell/asr0/run.sh index d8ae60623a7762a313ffe49cf61ebf7e6ccf0d76..270b88fc063ed1da690a2df3501c5f620dfb1677 100755 --- a/examples/aishell/asr0/run.sh +++ b/examples/aishell/asr0/run.sh @@ -50,5 +50,5 @@ fi # Optionally, you can add LM and test it with runtime. if [ ${stage} -le 6 ] && [ ${stop_stage} -ge 6 ]; then # test a single .wav file - CUDA_VISIBLE_DEVICES=0 ./local/test_hub.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${model_type} ${audio_file} || exit -1 + CUDA_VISIBLE_DEVICES=0 ./local/test_wav.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${model_type} ${audio_file} || exit -1 fi diff --git a/examples/aishell/asr1/README.md b/examples/aishell/asr1/README.md index 3ee9fa5eb2d0bf72650a08850b0d4872bd0b14ac..e9dc6b70553a307311ff4501bfaf230bb85698e1 100644 --- a/examples/aishell/asr1/README.md +++ b/examples/aishell/asr1/README.md @@ -323,7 +323,7 @@ In some situations, you want to use the trained model to do the inference for th ```bash if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then # test a single .wav file - CUDA_VISIBLE_DEVICES=0 ./local/test_hub.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${audio_file} || exit -1 + CUDA_VISIBLE_DEVICES=0 ./local/test_wav.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${audio_file} || exit -1 fi ``` @@ -341,5 +341,5 @@ wget -nc https://paddlespeech.bj.bcebos.com/datasets/single_wav/zh/demo_01_03.wa You need to prepare an audio file or use the audio demo above, please confirm the sample rate of the audio is 16K. You can get the result by running the script below. ```bash -CUDA_VISIBLE_DEVICES= ./local/test_hub.sh conf/transformer.yaml exp/transformer/checkpoints/avg_20 data/demo_01_03.wav +CUDA_VISIBLE_DEVICES= ./local/test_wav.sh conf/transformer.yaml exp/transformer/checkpoints/avg_20 data/demo_01_03.wav ``` diff --git a/examples/aishell/asr1/local/test_hub.sh b/examples/aishell/asr1/local/test_wav.sh similarity index 96% rename from examples/aishell/asr1/local/test_hub.sh rename to examples/aishell/asr1/local/test_wav.sh index 900ccc4b1eeb94302516380960bdea015ba9f341..f85c1a47e82b5328ce070e1e85bdcbdadcc85de4 100755 --- a/examples/aishell/asr1/local/test_hub.sh +++ b/examples/aishell/asr1/local/test_wav.sh @@ -39,7 +39,7 @@ for type in attention_rescoring; do batch_size=1 output_dir=${ckpt_prefix} mkdir -p ${output_dir} - python3 -u ${BIN_DIR}/test_hub.py \ + python3 -u ${BIN_DIR}/test_wav.py \ --ngpu ${ngpu} \ --config ${config_path} \ --result_file ${output_dir}/${type}.rsl \ diff --git a/examples/aishell/asr1/run.sh b/examples/aishell/asr1/run.sh index d9c0ee3e002d1c869a400119487a9068cde53c6d..d07a4ed5ce404881a9e7aca311a891f3a990f4da 100644 --- a/examples/aishell/asr1/run.sh +++ b/examples/aishell/asr1/run.sh @@ -43,7 +43,7 @@ fi # Optionally, you can add LM and test it with runtime. if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then # test a single .wav file - CUDA_VISIBLE_DEVICES=0 ./local/test_hub.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${audio_file} || exit -1 + CUDA_VISIBLE_DEVICES=0 ./local/test_wav.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${audio_file} || exit -1 fi # Not supported at now!!! diff --git a/examples/librispeech/asr0/local/test_hub.sh b/examples/librispeech/asr0/local/test_wav.sh similarity index 95% rename from examples/librispeech/asr0/local/test_hub.sh rename to examples/librispeech/asr0/local/test_wav.sh index 560d6758d3288f59347c2b3e3cc86741d2d6719b..e8337da7f699f35c1c6c6a74a8650deada03785d 100755 --- a/examples/librispeech/asr0/local/test_hub.sh +++ b/examples/librispeech/asr0/local/test_wav.sh @@ -30,7 +30,7 @@ if [ $? -ne 0 ]; then exit 1 fi -python3 -u ${BIN_DIR}/test_hub.py \ +python3 -u ${BIN_DIR}/test_wav.py \ --ngpu ${ngpu} \ --config ${config_path} \ --result_file ${ckpt_prefix}.rsl \ diff --git a/examples/librispeech/asr0/run.sh b/examples/librispeech/asr0/run.sh index 1253b409bd277314399a1fccf7331099d9f0e3b9..5d811b65324b7b7e4b6843a80fe5c6b6c07641bb 100755 --- a/examples/librispeech/asr0/run.sh +++ b/examples/librispeech/asr0/run.sh @@ -43,5 +43,5 @@ fi if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then # test a single .wav file - CUDA_VISIBLE_DEVICES=0 ./local/test_hub.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${model_type} ${audio_file} || exit -1 + CUDA_VISIBLE_DEVICES=0 ./local/test_wav.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${model_type} ${audio_file} || exit -1 fi diff --git a/examples/librispeech/asr1/README.md b/examples/librispeech/asr1/README.md index 331e2434fb06aa38a459e314c3d557bb7e35dc31..a2ec4f116f8c50b33d3f885c37fd4d41ff252e44 100644 --- a/examples/librispeech/asr1/README.md +++ b/examples/librispeech/asr1/README.md @@ -321,7 +321,7 @@ In some situations, you want to use the trained model to do the inference for th ```bash if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 5 ]; then # test a single .wav file - CUDA_VISIBLE_DEVICES=0 ./local/test_hub.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${audio_file} || exit -1 + CUDA_VISIBLE_DEVICES=0 ./local/test_wav.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${audio_file} || exit -1 fi ``` @@ -338,8 +338,8 @@ You can downloads the audio demo: wget -nc https://paddlespeech.bj.bcebos.com/datasets/single_wav/en/demo_002_en.wav -P data/ ``` -You need to prepare an audio file or use the audio demo, please confirm the sample rate of the audio is 16K. You can get the result of audio demo by running the script below. +You need to prepare an audio file or use the audio demo above, please confirm the sample rate of the audio is 16K. You can get the result of audio demo by running the script below. ```bash -CUDA_VISIBLE_DEVICES= ./local/test_hub.sh conf/conformer.yaml exp/conformer/checkpoints/avg_20 data/demo_002_en.wav +CUDA_VISIBLE_DEVICES= ./local/test_wav.sh conf/conformer.yaml exp/conformer/checkpoints/avg_20 data/demo_002_en.wav ``` diff --git a/examples/librispeech/asr1/local/test_hub.sh b/examples/librispeech/asr1/local/test_wav.sh similarity index 97% rename from examples/librispeech/asr1/local/test_hub.sh rename to examples/librispeech/asr1/local/test_wav.sh index ca63cf6ce48d88e1f163b55fc9dbfcaaff0c7fbe..ab6d685d8abd94acbc9057c60c0456b0991f9a0d 100755 --- a/examples/librispeech/asr1/local/test_hub.sh +++ b/examples/librispeech/asr1/local/test_wav.sh @@ -46,7 +46,7 @@ for type in attention_rescoring; do batch_size=1 output_dir=${ckpt_prefix} mkdir -p ${output_dir} - python3 -u ${BIN_DIR}/test_hub.py \ + python3 -u ${BIN_DIR}/test_wav.py \ --ngpu ${ngpu} \ --config ${config_path} \ --result_file ${output_dir}/${type}.rsl \ diff --git a/examples/librispeech/asr1/run.sh b/examples/librispeech/asr1/run.sh index d4e3d34fc45472454941d7118395ac2f620ed7ca..ff1d684be63d0c189db521fbb026d08b149c011a 100755 --- a/examples/librispeech/asr1/run.sh +++ b/examples/librispeech/asr1/run.sh @@ -44,12 +44,10 @@ fi if [ ${stage} -le 5 ] && [ ${stop_stage} -ge 6 ]; then # test a single .wav file - CUDA_VISIBLE_DEVICES=0 ./local/test_hub.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${audio_file} || exit -1 + CUDA_VISIBLE_DEVICES=0 ./local/test_wav.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} ${audio_file} || exit -1 fi if [ ${stage} -le 51 ] && [ ${stop_stage} -ge 51 ]; then # export ckpt avg_n CUDA_VISIBLE_DEVICES= ./local/export.sh ${conf_path} exp/${ckpt}/checkpoints/${avg_ckpt} exp/${ckpt}/checkpoints/${avg_ckpt}.jit fi - - diff --git a/paddlespeech/s2t/exps/deepspeech2/bin/test_hub.py b/paddlespeech/s2t/exps/deepspeech2/bin/test_wav.py similarity index 100% rename from paddlespeech/s2t/exps/deepspeech2/bin/test_hub.py rename to paddlespeech/s2t/exps/deepspeech2/bin/test_wav.py