From 754c0b560bd6e867a690ff6a51fb587e76906f75 Mon Sep 17 00:00:00 2001 From: huangyuxin Date: Tue, 9 Nov 2021 04:25:33 +0000 Subject: [PATCH] optimizer the hips of downloading LM --- README.md | 7 +++---- examples/aishell/s0/local/download_lm_ch.sh | 7 ++++--- examples/aishell/s0/local/test.sh | 2 +- examples/librispeech/s0/local/download_lm_en.sh | 6 ++++-- examples/librispeech/s0/local/test.sh | 2 +- examples/other/1xt2x/aishell/local/download_lm_ch.sh | 6 ++++-- examples/other/1xt2x/aishell/local/test.sh | 2 +- examples/other/1xt2x/baidu_en8k/local/download_lm_en.sh | 6 ++++-- examples/other/1xt2x/baidu_en8k/local/test.sh | 2 +- examples/other/1xt2x/librispeech/local/download_lm_en.sh | 6 ++++-- examples/other/1xt2x/librispeech/local/test.sh | 2 +- examples/tiny/s0/local/download_lm_en.sh | 6 ++++-- examples/tiny/s0/local/test.sh | 2 +- 13 files changed, 33 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 6bc8e353..7efe0429 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ The current hyperlinks redirect to [Previous Parakeet](https://github.com/Paddle Aishell DeepSpeech2 RNN + Conv based Models - deepspeech2-aishell + deepspeech2-aishell @@ -200,7 +200,7 @@ The current hyperlinks redirect to [Previous Parakeet](https://github.com/Paddle Librispeech Transformer based Attention Models - deepspeech2-librispeech / transformer.conformer.u2-librispeech / transformer.conformer.u2-kaldi-librispeech + deepspeech2-librispeech / transformer.conformer.u2-librispeech / transformer.conformer.u2-kaldi-librispeech @@ -223,7 +223,7 @@ The current hyperlinks redirect to [Previous Parakeet](https://github.com/Paddle TIMIT Unified Streaming & Non-streaming Two-pass - u2-timit + u2-timit @@ -351,4 +351,3 @@ howpublished = {\url{https://github.com/PaddlePaddle/DeepSpeech}}, year={2021} } ``` - diff --git a/examples/aishell/s0/local/download_lm_ch.sh b/examples/aishell/s0/local/download_lm_ch.sh index ac27a907..7d20297f 100755 --- a/examples/aishell/s0/local/download_lm_ch.sh +++ b/examples/aishell/s0/local/download_lm_ch.sh @@ -9,12 +9,13 @@ URL='https://deepspeech.bj.bcebos.com/zh_lm/zh_giga.no_cna_cmn.prune01244.klm' MD5="29e02312deb2e59b3c8686c7966d4fe3" TARGET=${DIR}/zh_giga.no_cna_cmn.prune01244.klm - -echo "Download language model ..." -download $URL $MD5 $TARGET +echo "Start downloading the language model. The language model is large, please wait for a moment ..." +download $URL $MD5 $TARGET > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "Fail to download the language model!" exit 1 +else + echo "Download the language model sucessfully" fi diff --git a/examples/aishell/s0/local/test.sh b/examples/aishell/s0/local/test.sh index d539ac49..2ae0740b 100755 --- a/examples/aishell/s0/local/test.sh +++ b/examples/aishell/s0/local/test.sh @@ -13,7 +13,7 @@ ckpt_prefix=$2 model_type=$3 # download language model -bash local/download_lm_ch.sh > /dev/null 2>&1 +bash local/download_lm_ch.sh if [ $? -ne 0 ]; then exit 1 fi diff --git a/examples/librispeech/s0/local/download_lm_en.sh b/examples/librispeech/s0/local/download_lm_en.sh index dc1bdf66..390fffc9 100755 --- a/examples/librispeech/s0/local/download_lm_en.sh +++ b/examples/librispeech/s0/local/download_lm_en.sh @@ -9,11 +9,13 @@ URL=https://deepspeech.bj.bcebos.com/en_lm/common_crawl_00.prune01111.trie.klm MD5="099a601759d467cd0a8523ff939819c5" TARGET=${DIR}/common_crawl_00.prune01111.trie.klm -echo "Download language model ..." -download $URL $MD5 $TARGET +echo "Start downloading the language model. The language model is large, please wait for a moment ..." +download $URL $MD5 $TARGET > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "Fail to download the language model!" exit 1 +else + echo "Download the language model sucessfully" fi diff --git a/examples/librispeech/s0/local/test.sh b/examples/librispeech/s0/local/test.sh index 25dd0437..4d00f30b 100755 --- a/examples/librispeech/s0/local/test.sh +++ b/examples/librispeech/s0/local/test.sh @@ -13,7 +13,7 @@ ckpt_prefix=$2 model_type=$3 # download language model -bash local/download_lm_en.sh > /dev/null 2>&1 +bash local/download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi diff --git a/examples/other/1xt2x/aishell/local/download_lm_ch.sh b/examples/other/1xt2x/aishell/local/download_lm_ch.sh index ac27a907..47153f4b 100755 --- a/examples/other/1xt2x/aishell/local/download_lm_ch.sh +++ b/examples/other/1xt2x/aishell/local/download_lm_ch.sh @@ -10,11 +10,13 @@ MD5="29e02312deb2e59b3c8686c7966d4fe3" TARGET=${DIR}/zh_giga.no_cna_cmn.prune01244.klm -echo "Download language model ..." -download $URL $MD5 $TARGET +echo "Start downloading the language model. The language model is large, please wait for a moment ..." +download $URL $MD5 $TARGET > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "Fail to download the language model!" exit 1 +else + echo "Download the language model sucessfully" fi diff --git a/examples/other/1xt2x/aishell/local/test.sh b/examples/other/1xt2x/aishell/local/test.sh index d539ac49..2ae0740b 100755 --- a/examples/other/1xt2x/aishell/local/test.sh +++ b/examples/other/1xt2x/aishell/local/test.sh @@ -13,7 +13,7 @@ ckpt_prefix=$2 model_type=$3 # download language model -bash local/download_lm_ch.sh > /dev/null 2>&1 +bash local/download_lm_ch.sh if [ $? -ne 0 ]; then exit 1 fi diff --git a/examples/other/1xt2x/baidu_en8k/local/download_lm_en.sh b/examples/other/1xt2x/baidu_en8k/local/download_lm_en.sh index dc1bdf66..390fffc9 100755 --- a/examples/other/1xt2x/baidu_en8k/local/download_lm_en.sh +++ b/examples/other/1xt2x/baidu_en8k/local/download_lm_en.sh @@ -9,11 +9,13 @@ URL=https://deepspeech.bj.bcebos.com/en_lm/common_crawl_00.prune01111.trie.klm MD5="099a601759d467cd0a8523ff939819c5" TARGET=${DIR}/common_crawl_00.prune01111.trie.klm -echo "Download language model ..." -download $URL $MD5 $TARGET +echo "Start downloading the language model. The language model is large, please wait for a moment ..." +download $URL $MD5 $TARGET > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "Fail to download the language model!" exit 1 +else + echo "Download the language model sucessfully" fi diff --git a/examples/other/1xt2x/baidu_en8k/local/test.sh b/examples/other/1xt2x/baidu_en8k/local/test.sh index 25dd0437..4d00f30b 100755 --- a/examples/other/1xt2x/baidu_en8k/local/test.sh +++ b/examples/other/1xt2x/baidu_en8k/local/test.sh @@ -13,7 +13,7 @@ ckpt_prefix=$2 model_type=$3 # download language model -bash local/download_lm_en.sh > /dev/null 2>&1 +bash local/download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi diff --git a/examples/other/1xt2x/librispeech/local/download_lm_en.sh b/examples/other/1xt2x/librispeech/local/download_lm_en.sh index dc1bdf66..390fffc9 100755 --- a/examples/other/1xt2x/librispeech/local/download_lm_en.sh +++ b/examples/other/1xt2x/librispeech/local/download_lm_en.sh @@ -9,11 +9,13 @@ URL=https://deepspeech.bj.bcebos.com/en_lm/common_crawl_00.prune01111.trie.klm MD5="099a601759d467cd0a8523ff939819c5" TARGET=${DIR}/common_crawl_00.prune01111.trie.klm -echo "Download language model ..." -download $URL $MD5 $TARGET +echo "Start downloading the language model. The language model is large, please wait for a moment ..." +download $URL $MD5 $TARGET > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "Fail to download the language model!" exit 1 +else + echo "Download the language model sucessfully" fi diff --git a/examples/other/1xt2x/librispeech/local/test.sh b/examples/other/1xt2x/librispeech/local/test.sh index 25dd0437..4d00f30b 100755 --- a/examples/other/1xt2x/librispeech/local/test.sh +++ b/examples/other/1xt2x/librispeech/local/test.sh @@ -13,7 +13,7 @@ ckpt_prefix=$2 model_type=$3 # download language model -bash local/download_lm_en.sh > /dev/null 2>&1 +bash local/download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi diff --git a/examples/tiny/s0/local/download_lm_en.sh b/examples/tiny/s0/local/download_lm_en.sh index dc1bdf66..390fffc9 100755 --- a/examples/tiny/s0/local/download_lm_en.sh +++ b/examples/tiny/s0/local/download_lm_en.sh @@ -9,11 +9,13 @@ URL=https://deepspeech.bj.bcebos.com/en_lm/common_crawl_00.prune01111.trie.klm MD5="099a601759d467cd0a8523ff939819c5" TARGET=${DIR}/common_crawl_00.prune01111.trie.klm -echo "Download language model ..." -download $URL $MD5 $TARGET +echo "Start downloading the language model. The language model is large, please wait for a moment ..." +download $URL $MD5 $TARGET > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "Fail to download the language model!" exit 1 +else + echo "Download the language model sucessfully" fi diff --git a/examples/tiny/s0/local/test.sh b/examples/tiny/s0/local/test.sh index 25dd0437..4d00f30b 100755 --- a/examples/tiny/s0/local/test.sh +++ b/examples/tiny/s0/local/test.sh @@ -13,7 +13,7 @@ ckpt_prefix=$2 model_type=$3 # download language model -bash local/download_lm_en.sh > /dev/null 2>&1 +bash local/download_lm_en.sh if [ $? -ne 0 ]; then exit 1 fi