fix demos/audio_content_search readme error

pull/3778/head
mjxs_kk 1 year ago
parent bcbb85af76
commit f5ce1cfb1b

@ -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 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) - Command Line(Recommended)
```bash ```bash
# Chinese # 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: Usage:

@ -29,11 +29,40 @@ pip install -r requriement.txt
```bash ```bash
wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav 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 ```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 [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}]} {'transcription': '我认为跑步最重要的就是给我带来了身体健康', 'acs': [{'w': '我', 'bg': 0, 'ed': 1.6800000000000002}, {'w': '我', 'bg': 2.1, 'ed': 4.28}, {'w': '康', 'bg': 3.2, 'ed': 4.92}]}
``` ```

Loading…
Cancel
Save