diff --git a/examples/aishell/run_data.sh b/examples/aishell/run_data.sh index db27c530..8bacf6d8 100644 --- a/examples/aishell/run_data.sh +++ b/examples/aishell/run_data.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download data, generate manifests PYTHONPATH=.:$PYTHONPATH python data/aishell/aishell.py \ diff --git a/examples/aishell/run_infer.sh b/examples/aishell/run_infer.sh index 332bdbe1..404555e8 100644 --- a/examples/aishell/run_infer.sh +++ b/examples/aishell/run_infer.sh @@ -1,14 +1,14 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_ch.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # infer diff --git a/examples/aishell/run_infer_golden.sh b/examples/aishell/run_infer_golden.sh index ac79a4dd..4701bdaa 100644 --- a/examples/aishell/run_infer_golden.sh +++ b/examples/aishell/run_infer_golden.sh @@ -1,23 +1,23 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_ch.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # download well-trained model -pushd models/aishell > /dev/null +cd models/aishell > /dev/null sh download_model.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # infer diff --git a/examples/aishell/run_test.sh b/examples/aishell/run_test.sh index bfbbcad5..266c7367 100644 --- a/examples/aishell/run_test.sh +++ b/examples/aishell/run_test.sh @@ -1,14 +1,14 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_ch.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # evaluate model diff --git a/examples/aishell/run_test_golden.sh b/examples/aishell/run_test_golden.sh index e40e8040..50e7fe2c 100644 --- a/examples/aishell/run_test_golden.sh +++ b/examples/aishell/run_test_golden.sh @@ -1,23 +1,23 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_ch.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # download well-trained model -pushd models/aishell > /dev/null +cd models/aishell > /dev/null sh download_model.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # evaluate model diff --git a/examples/aishell/run_train.sh b/examples/aishell/run_train.sh index 76d75fa2..8e61ec3c 100644 --- a/examples/aishell/run_train.sh +++ b/examples/aishell/run_train.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # train model # if you wish to resume from an exists model, uncomment --init_model_path diff --git a/examples/librispeech/run_data.sh b/examples/librispeech/run_data.sh index 957416f4..b1ad68ab 100644 --- a/examples/librispeech/run_data.sh +++ b/examples/librispeech/run_data.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download data, generate manifests PYTHONPATH=.:$PYPYTHONPATH python data/librispeech/librispeech.py \ diff --git a/examples/librispeech/run_infer.sh b/examples/librispeech/run_infer.sh index 85587ed4..2df5b6cc 100644 --- a/examples/librispeech/run_infer.sh +++ b/examples/librispeech/run_infer.sh @@ -1,14 +1,14 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # infer diff --git a/examples/librispeech/run_infer_golden.sh b/examples/librispeech/run_infer_golden.sh index 8feca555..c407cabe 100644 --- a/examples/librispeech/run_infer_golden.sh +++ b/examples/librispeech/run_infer_golden.sh @@ -1,23 +1,23 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # download well-trained model -pushd models/librispeech > /dev/null +cd models/librispeech > /dev/null sh download_model.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # infer diff --git a/examples/librispeech/run_test.sh b/examples/librispeech/run_test.sh index d75848b0..d79a2256 100644 --- a/examples/librispeech/run_test.sh +++ b/examples/librispeech/run_test.sh @@ -1,14 +1,14 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # evaluate model diff --git a/examples/librispeech/run_test_golden.sh b/examples/librispeech/run_test_golden.sh index 352a9415..011cdd2a 100644 --- a/examples/librispeech/run_test_golden.sh +++ b/examples/librispeech/run_test_golden.sh @@ -1,23 +1,23 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # download well-trained model -pushd models/librispeech > /dev/null +cd models/librispeech > /dev/null sh download_model.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # evaluate model diff --git a/examples/librispeech/run_train.sh b/examples/librispeech/run_train.sh index 1d18f29e..69251fe0 100644 --- a/examples/librispeech/run_train.sh +++ b/examples/librispeech/run_train.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # train model # if you wish to resume from an exists model, uncomment --init_model_path diff --git a/examples/librispeech/run_tune.sh b/examples/librispeech/run_tune.sh index 1f76ad70..78b2972d 100644 --- a/examples/librispeech/run_tune.sh +++ b/examples/librispeech/run_tune.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # grid-search for hyper-parameters in language model CUDA_VISIBLE_DEVICES=0,1,2,3 \ diff --git a/examples/mandarin/run_demo_client.sh b/examples/mandarin/run_demo_client.sh index bf8e5451..6ae4ddca 100644 --- a/examples/mandarin/run_demo_client.sh +++ b/examples/mandarin/run_demo_client.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # start demo client CUDA_VISIBLE_DEVICES=0 \ diff --git a/examples/mandarin/run_demo_server.sh b/examples/mandarin/run_demo_server.sh index b0d4bc7f..d98a99d0 100644 --- a/examples/mandarin/run_demo_server.sh +++ b/examples/mandarin/run_demo_server.sh @@ -1,24 +1,24 @@ #! /usr/bin/env bash # TODO: replace the model with a mandarin model -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # download well-trained model -pushd models/librispeech > /dev/null +cd models/librispeech > /dev/null sh download_model.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # start demo server diff --git a/examples/tiny/run_data.sh b/examples/tiny/run_data.sh index a98dab21..0b03ec5d 100644 --- a/examples/tiny/run_data.sh +++ b/examples/tiny/run_data.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # prepare folder if [ ! -e data/tiny ]; then diff --git a/examples/tiny/run_infer.sh b/examples/tiny/run_infer.sh index 85b083a2..cbd049a6 100644 --- a/examples/tiny/run_infer.sh +++ b/examples/tiny/run_infer.sh @@ -1,14 +1,14 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # infer diff --git a/examples/tiny/run_infer_golden.sh b/examples/tiny/run_infer_golden.sh index 3ee2f9ae..6567542b 100644 --- a/examples/tiny/run_infer_golden.sh +++ b/examples/tiny/run_infer_golden.sh @@ -1,23 +1,23 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # download well-trained model -pushd models/librispeech > /dev/null +cd models/librispeech > /dev/null sh download_model.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # infer diff --git a/examples/tiny/run_test.sh b/examples/tiny/run_test.sh index 06307632..690dfe73 100644 --- a/examples/tiny/run_test.sh +++ b/examples/tiny/run_test.sh @@ -1,14 +1,14 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # evaluate model diff --git a/examples/tiny/run_test_golden.sh b/examples/tiny/run_test_golden.sh index 351cb87c..16adf298 100644 --- a/examples/tiny/run_test_golden.sh +++ b/examples/tiny/run_test_golden.sh @@ -1,23 +1,23 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # download language model -pushd models/lm > /dev/null +cd models/lm > /dev/null sh download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # download well-trained model -pushd models/librispeech > /dev/null +cd models/librispeech > /dev/null sh download_model.sh if [ $? -ne 0 ]; then exit 1 fi -popd > /dev/null +cd - > /dev/null # evaluate model diff --git a/examples/tiny/run_train.sh b/examples/tiny/run_train.sh index 957aa63b..88b09bee 100644 --- a/examples/tiny/run_train.sh +++ b/examples/tiny/run_train.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # train model # if you wish to resume from an exists model, uncomment --init_model_path diff --git a/examples/tiny/run_tune.sh b/examples/tiny/run_tune.sh index 564da4ac..89f8adf4 100644 --- a/examples/tiny/run_tune.sh +++ b/examples/tiny/run_tune.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -pushd ../.. > /dev/null +cd ../.. > /dev/null # grid-search for hyper-parameters in language model CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \ diff --git a/models/aishell/download_model.sh b/models/aishell/download_model.sh index 77fc84b5..19aec554 100644 --- a/models/aishell/download_model.sh +++ b/models/aishell/download_model.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source ../../utils/utility.sh +. ../../utils/utility.sh URL='http://cloud.dlnel.org/filepub/?uuid=6c83b9d8-3255-4adf-9726-0fe0be3d0274' MD5=28521a58552885a81cf92a1e9b133a71 diff --git a/models/librispeech/download_model.sh b/models/librispeech/download_model.sh index 7c46c099..0048ff16 100644 --- a/models/librispeech/download_model.sh +++ b/models/librispeech/download_model.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source ../../utils/utility.sh +. ../../utils/utility.sh URL='http://cloud.dlnel.org/filepub/?uuid=8e3cf742-2ff3-41ce-a49d-f6158cc06a23' MD5=2ef08f8b608a7c555592161fc14d81a6 diff --git a/models/lm/download_lm_ch.sh b/models/lm/download_lm_ch.sh index 46bfe932..c719f9a9 100644 --- a/models/lm/download_lm_ch.sh +++ b/models/lm/download_lm_ch.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source ../../utils/utility.sh +. ../../utils/utility.sh URL=http://cloud.dlnel.org/filepub/?uuid=d21861e4-4ed6-45bb-ad8e-ae417a43195e MD5="29e02312deb2e59b3c8686c7966d4fe3" diff --git a/models/lm/download_lm_en.sh b/models/lm/download_lm_en.sh index fbfe647e..d131636e 100644 --- a/models/lm/download_lm_en.sh +++ b/models/lm/download_lm_en.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source ../../utils/utility.sh +. ../../utils/utility.sh URL=http://paddlepaddle.bj.bcebos.com/model_zoo/speech/common_crawl_00.prune01111.trie.klm MD5="099a601759d467cd0a8523ff939819c5"