【ASR】fix acs demo (#3826)

* fix demo acs

* fix
pull/3830/head
zxcd 4 months ago committed by GitHub
parent 2e93229a93
commit d615fc33de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -19,7 +19,7 @@ You can choose one way from meduim and hard to install paddlespeech.
The dependency refers to the requirements.txt, and install the dependency as follows:
```
pip install -r requriement.txt
pip install -r requirements.txt
```
### 2. Prepare Input File
@ -30,11 +30,20 @@ Here are sample files for this demo that can be downloaded:
wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
```
### 3. Usage
### 3. run paddlespeech_server
Before using the client, it is necessary to start paddlespeech_servers.
Here are sample server configuration
```bash
bash demos/audio_content_search/run.sh
```
The logs of the two services will be recorded in 'acs.log' and 'streaming_asr.log' in this configuration.
### 4. 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:

@ -19,7 +19,7 @@
依赖参见 requirements.txt, 安装依赖
```
pip install -r requriement.txt
pip install -r requirements.txt
```
### 2. 准备输入
@ -29,16 +29,26 @@ pip install -r requriement.txt
```bash
wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
```
### 3. 使用方法
### 3. 启动 server
使用 client 之前需要先启动 paddlespeech_server。
可以使用默认 server 配置:
```bash
bash demos/audio_content_search/run.sh
```
该配置下两个服务的日志会被记录在 `acs.log``streaming_asr.log` 中。
### 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
```
使用方法:
```bash
paddlespeech acs --help
paddlespeech asr --help
```
参数:
- `input`(必须输入):用于识别的音频文件。

@ -26,8 +26,10 @@ asr_online:
sample_rate: 16000
cfg_path:
decode_method: 'attention_rescoring'
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
force_yes: True
device: 'cpu' # cpu or gpu:id
continuous_decoding: False # disable continue decoding when endpoint detected
am_predictor_conf:
device: # set 'gpu:id' or 'cpu'
switch_ir_optim: True
@ -40,4 +42,4 @@ asr_online:
window_ms: 25 # ms
shift_ms: 10 # ms
sample_rate: 16000
sample_width: 2
sample_width: 2

@ -31,6 +31,7 @@ asr_online:
force_yes: True
device: 'cpu' # cpu or gpu:id
decode_method: "attention_rescoring"
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
am_predictor_conf:
device: # set 'gpu:id' or 'cpu'
switch_ir_optim: True

Loading…
Cancel
Save