提交 1e999c27 编写于 作者: H huangyuxin

fix exit, test=doc

上级 25cb4d62
......@@ -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")
exit(1)
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")
......
......@@ -22,7 +22,7 @@ paddlespeech asr --model deepspeech2offline_librispeech --lang en --input ./en.w
# 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.
先完成此消息的编辑!
想要评论请 注册