From 903060654f3de8d4c2eaa06c142536a28f9d0202 Mon Sep 17 00:00:00 2001 From: xiongxinlei Date: Tue, 17 May 2022 23:36:30 +0800 Subject: [PATCH] update the acs server config, test=doc --- demos/audio_content_search/README.md | 5 +++-- demos/audio_content_search/README_cn.md | 1 + demos/audio_content_search/conf/acs_application.yaml | 6 ++---- .../conf/ws_conformer_application.yaml | 6 ++---- demos/audio_content_search/run.sh | 7 ++++--- 5 files changed, 12 insertions(+), 13 deletions(-) diff --git a/demos/audio_content_search/README.md b/demos/audio_content_search/README.md index 040d215f..3d16bcdd 100644 --- a/demos/audio_content_search/README.md +++ b/demos/audio_content_search/README.md @@ -2,9 +2,9 @@ # ACS (Audio Content Search) ## Introduction -ACS, or Audio Content Search, refers to the problem of getting the key word time stamp to from automatically transcribe spoken language (speech-to-text). +ACS, or Audio Content Search, refers to the problem of getting the key word time stamp from automatically transcribe spoken language (speech-to-text). -This demo is an implementation to get the key word stamp from the text from a specific audio file. It can be done by a single command or a few lines in python using `PaddleSpeech`. +This demo is an implementation of obtaining the keyword timestamp in the text from a given audio file. It can be done by a single command or a few lines in python using `PaddleSpeech`. ## Usage ### 1. Installation @@ -12,6 +12,7 @@ see [installation](https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/doc You can choose one way from meduim and hard to install paddlespeech. +The dependency refers to the requirements.txt ### 2. Prepare Input File The input of this demo should be a WAV file(`.wav`), and the sample rate must be the same as the model. diff --git a/demos/audio_content_search/README_cn.md b/demos/audio_content_search/README_cn.md index 6ccf328d..385ccbc9 100644 --- a/demos/audio_content_search/README_cn.md +++ b/demos/audio_content_search/README_cn.md @@ -11,6 +11,7 @@ 请看[安装文档](https://github.com/PaddlePaddle/PaddleSpeech/blob/develop/docs/source/install_cn.md)。 你可以从 medium,hard 三中方式中选择一种方式安装。 +依赖参见 requirements.txt ### 2. 准备输入 这个 demo 的输入应该是一个 WAV 文件(`.wav`),并且采样率必须与模型的采样率相同。 diff --git a/demos/audio_content_search/conf/acs_application.yaml b/demos/audio_content_search/conf/acs_application.yaml index b862931a..d3c5e303 100644 --- a/demos/audio_content_search/conf/acs_application.yaml +++ b/demos/audio_content_search/conf/acs_application.yaml @@ -1,5 +1,3 @@ -# This is the parameter configuration file for PaddleSpeech Serving. - ################################################################################# # SERVER SETTING # ################################################################################# @@ -18,8 +16,8 @@ engine_list: ['acs_python'] # ENGINE CONFIG # ################################################################################# -################################### Text ######################################### -################### acs task: engine_type: python ####################### +################################### ACS ######################################### +################### acs task: engine_type: python ############################### acs_python: task: acs asr_protocol: 'websocket' # 'websocket' diff --git a/demos/audio_content_search/conf/ws_conformer_application.yaml b/demos/audio_content_search/conf/ws_conformer_application.yaml index 2affde07..97201382 100644 --- a/demos/audio_content_search/conf/ws_conformer_application.yaml +++ b/demos/audio_content_search/conf/ws_conformer_application.yaml @@ -1,10 +1,8 @@ -# This is the parameter configuration file for PaddleSpeech Serving. - ################################################################################# # SERVER SETTING # ################################################################################# host: 0.0.0.0 -port: 8090 +port: 8390 # The task format in the engin_list is: _ # task choices = ['asr_online'] @@ -27,7 +25,7 @@ asr_online: lang: 'zh' sample_rate: 16000 cfg_path: - decode_method: + decode_method: 'attention_rescoring' force_yes: True device: 'cpu' # cpu or gpu:id am_predictor_conf: diff --git a/demos/audio_content_search/run.sh b/demos/audio_content_search/run.sh index ddebdfee..e322a37c 100755 --- a/demos/audio_content_search/run.sh +++ b/demos/audio_content_search/run.sh @@ -1,6 +1,7 @@ export CUDA_VISIBLE_DEVICE=0,1,2,3 -#nohup python3 streaming_asr_server.py --config_file conf/ws_conformer_application.yaml &> streaming_asr.log & +# we need the streaming asr server +nohup python3 streaming_asr_server.py --config_file conf/ws_conformer_application.yaml > streaming_asr.log 2>&1 & -# nohup python3 punc_server.py --config_file conf/punc_application.yaml > punc.log 2>&1 & -paddlespeech_server start --config_file conf/acs_application.yaml +# start the acs server +nohup paddlespeech_server start --config_file conf/acs_application.yaml > acs.log 2>&1 &