未验证 提交 f1185541 编写于 作者: H Hui Zhang 提交者: GitHub

Merge pull request #1770 from Jackwaterveg/cli

[ASR] fix asr cli infer
......@@ -346,7 +346,7 @@ class ASRExecutor(BaseExecutor):
max_duration = 50.0
if audio_duration >= max_duration:
logger.error("Please input audio file less then 50 seconds.\n")
return
return False
except Exception as e:
logger.exception(e)
logger.error(
......@@ -383,7 +383,7 @@ class ASRExecutor(BaseExecutor):
) == "n" or content.strip() == "no" or content.strip(
) == "No":
logger.info("Exit the program")
exit(1)
return False
else:
logger.warning("Not regular input, please input again")
......
......@@ -12,12 +12,17 @@ paddlespeech text --input 今天的天气真不错啊你下午有空吗我想约
# Speech_recognition
wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespeech.bj.bcebos.com/PaddleAudio/en.wav
paddlespeech asr --input ./zh.wav
paddlespeech asr --model conformer_aishell --input ./zh.wav
paddlespeech asr --model conformer_online_aishell --input ./zh.wav
paddlespeech asr --model transformer_librispeech --lang en --input ./en.wav
paddlespeech asr --model deepspeech2offline_aishell --input ./zh.wav
paddlespeech asr --model deepspeech2online_aishell --input ./zh.wav
paddlespeech asr --model deepspeech2offline_librispeech --lang en --input ./en.wav
# long audio restriction
wget -c wget https://paddlespeech.bj.bcebos.com/datasets/single_wav/zh/test_long_audio_01.wav
paddlespeech asr --input test_long_audio_01.wav
if [ $? -ne 1 ]; then
if [ $? -ne -1 ]; then
exit 1
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册