From f5ce1cfb1b0b689c5332a8123653a8d3d835ea7a Mon Sep 17 00:00:00 2001 From: mjxs_kk <1546760512@qq.com> Date: Sun, 26 May 2024 22:00:27 +0800 Subject: [PATCH 1/3] fix demos/audio_content_search readme error --- demos/audio_content_search/README.md | 35 +++++++++++++++++++++++-- demos/audio_content_search/README_cn.md | 34 ++++++++++++++++++++++-- 2 files changed, 65 insertions(+), 4 deletions(-) diff --git a/demos/audio_content_search/README.md b/demos/audio_content_search/README.md index 4428bf38947..2cce00097fa 100644 --- a/demos/audio_content_search/README.md +++ b/demos/audio_content_search/README.md @@ -30,11 +30,42 @@ Here are sample files for this demo that can be downloaded: wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav ``` -### 3. Usage +### 3. Server Usage + +- Command Line (Recommended) + **Note:** The default deployment of the server is on the 'CPU' device, which can be deployed on the 'GPU' by modifying the 'device' parameter in the service configuration file. + ```bash + # in PaddleSpeech/demos/audio_content_search start the service + paddlespeech_server start --config_file ./conf/ws_conformer_wenetspeech_application.yaml + ``` + + Usage: + + ```bash + paddlespeech_server start --help + ``` + Arguments: + - `config_file`: yaml file of the app, defalut: `./conf/application.yaml` + - `log_file`: log file. Default: `./log/paddlespeech.log` + + Output: + ```bash + [2024-05-14 08: 51: 04,823] [ INFO] - start to init the engine + [2024-05-14 08: 51: 04,824] [ INFO] - acs : python engine. + [2024-05-14 08: 51: 04,831] [ INFO] - word list: ['我', '康'] + [2024-05-14 08: 51: 04,831] [ INFO] - Initialize acs server engine successfully on device: cpu. + INFO: Started server process [21242] + INFO: Waiting for application startup. + INFO: Application startup complete. + INFO: Uvicorn running on http: /0.0.0.0:8490 (Press CTRL+C to quit) + ``` + +### 4. Client Usage + - Command Line(Recommended) ```bash # Chinese - paddlespeech_client acs --server_ip 127.0.0.1 --port 8090 --input ./zh.wav + paddlespeech_client acs --server_ip 127.0.0.1 --port 8490 --input ./zh.wav ``` Usage: diff --git a/demos/audio_content_search/README_cn.md b/demos/audio_content_search/README_cn.md index 6f51c4cf269..8136c0a997b 100644 --- a/demos/audio_content_search/README_cn.md +++ b/demos/audio_content_search/README_cn.md @@ -29,11 +29,40 @@ pip install -r requriement.txt ```bash wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav ``` -### 3. 使用方法 +### 3. 服务端使用方法 +- 命令行 (推荐使用) + **注意:** 默认部署在 `cpu` 设备上,可以通过修改服务配置文件中 `device` 参数部署在 `gpu` 上。 + ```bash + # 在 PaddleSpeech/demos/audio_content_search 目录启动服务 + paddlespeech_server start --config_file ./conf/ws_conformer_application.yaml + ``` + + 使用方法: + + ```bash + paddlespeech_server start --help + ``` + 参数: + - `config_file`: 服务的配置文件,默认: `./conf/application.yaml` + - `log_file`: log 文件. 默认:`./log/paddlespeech.log` + + 输出: + ```text + [2024-05-14 08: 51: 04,823] [ INFO] - start to init the engine + [2024-05-14 08: 51: 04,824] [ INFO] - acs : python engine. + [2024-05-14 08: 51: 04,831] [ INFO] - word list: ['我', '康'] + [2024-05-14 08: 51: 04,831] [ INFO] - Initialize acs server engine successfully on device: cpu. + INFO: Started server process [21242] + INFO: Waiting for application startup. + INFO: Application startup complete. + INFO: Uvicorn running on http: /0.0.0.0:8490 (Press CTRL+C to quit) + ``` + +### 4.客户端使用方法 - 命令行 (推荐使用) ```bash # 中文 - paddlespeech_client acs --server_ip 127.0.0.1 --port 8090 --input ./zh.wav + paddlespeech_client acs --server_ip 127.0.0.1 --port 8490 --input ./zh.wav ``` 使用方法: @@ -76,3 +105,4 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav [2022-05-15 15:08:19,026] [ INFO] - acs http client finished {'transcription': '我认为跑步最重要的就是给我带来了身体健康', 'acs': [{'w': '我', 'bg': 0, 'ed': 1.6800000000000002}, {'w': '我', 'bg': 2.1, 'ed': 4.28}, {'w': '康', 'bg': 3.2, 'ed': 4.92}]} ``` + From c9fd701c1899d04e4a647680be2a8cc36b4c6611 Mon Sep 17 00:00:00 2001 From: mjxs <52824616+kk-2000@users.noreply.github.com> Date: Sun, 26 May 2024 22:07:58 +0800 Subject: [PATCH 2/3] Update README_cn.md --- demos/audio_content_search/README_cn.md | 1 - 1 file changed, 1 deletion(-) diff --git a/demos/audio_content_search/README_cn.md b/demos/audio_content_search/README_cn.md index 8136c0a997b..81838cad164 100644 --- a/demos/audio_content_search/README_cn.md +++ b/demos/audio_content_search/README_cn.md @@ -105,4 +105,3 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav [2022-05-15 15:08:19,026] [ INFO] - acs http client finished {'transcription': '我认为跑步最重要的就是给我带来了身体健康', 'acs': [{'w': '我', 'bg': 0, 'ed': 1.6800000000000002}, {'w': '我', 'bg': 2.1, 'ed': 4.28}, {'w': '康', 'bg': 3.2, 'ed': 4.92}]} ``` - From c239c1dd1341ca844d2a590e8b9459bc500854c7 Mon Sep 17 00:00:00 2001 From: mjxs <52824616+kk-2000@users.noreply.github.com> Date: Mon, 3 Jun 2024 09:41:13 +0800 Subject: [PATCH 3/3] Update README.md --- demos/audio_content_search/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/audio_content_search/README.md b/demos/audio_content_search/README.md index 2cce00097fa..2ab8b8eaf3d 100644 --- a/demos/audio_content_search/README.md +++ b/demos/audio_content_search/README.md @@ -36,7 +36,7 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav **Note:** The default deployment of the server is on the 'CPU' device, which can be deployed on the 'GPU' by modifying the 'device' parameter in the service configuration file. ```bash # in PaddleSpeech/demos/audio_content_search start the service - paddlespeech_server start --config_file ./conf/ws_conformer_wenetspeech_application.yaml + paddlespeech_server start --config_file ./conf/acs_application.yaml ``` Usage: