From 4125ccec87e588824310df6935f81be1f1a1ebfd Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Fri, 5 Nov 2021 11:01:47 +0000 Subject: [PATCH] asr demo --- demos/echo/.gitignore | 1 + demos/echo/README.md | 3 +++ demos/echo/run.sh | 17 +++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 demos/echo/.gitignore create mode 100644 demos/echo/README.md create mode 100755 demos/echo/run.sh diff --git a/demos/echo/.gitignore b/demos/echo/.gitignore new file mode 100644 index 00000000..1269488f --- /dev/null +++ b/demos/echo/.gitignore @@ -0,0 +1 @@ +data diff --git a/demos/echo/README.md b/demos/echo/README.md new file mode 100644 index 00000000..10e443f2 --- /dev/null +++ b/demos/echo/README.md @@ -0,0 +1,3 @@ +# echo system + +ASR + TTS diff --git a/demos/echo/run.sh b/demos/echo/run.sh new file mode 100755 index 00000000..c2379c3a --- /dev/null +++ b/demos/echo/run.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +mkdir -p data + +wav_en=data/en.wav +wav_zh=data/zh.wav + +test -e ${wav_en} || wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/en.wav -P data +test -e ${wav_zh} || wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav -P data + +pip install paddlehub + +asr_en_cmd="import paddlehub as hub; model = hub.Module(name='u2_conformer_librispeech'); print(model.speech_recognize("${wav_en}", device='gpu'))" +asr_zh_cmd="import paddlehub as hub; model = hub.Module(name='u2_conformer_aishell'); print(model.speech_recognize("${wav_zh}", device='gpu'))" + +python -c "${asr_en_cmd}" +python -c "${asr_zh_cmd}" \ No newline at end of file