Skip to content

Commit d615fc3

Browse files
authored
【ASR】fix acs demo (#3826)
* fix demo acs * fix
1 parent 2e93229 commit d615fc3

File tree

4 files changed

+30
-8
lines changed

4 files changed

+30
-8
lines changed

demos/audio_content_search/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can choose one way from meduim and hard to install paddlespeech.
1919
The dependency refers to the requirements.txt, and install the dependency as follows:
2020

2121
```
22-
pip install -r requriement.txt
22+
pip install -r requirements.txt
2323
```
2424

2525
### 2. Prepare Input File
@@ -30,11 +30,20 @@ Here are sample files for this demo that can be downloaded:
3030
wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
3131
```
3232

33-
### 3. Usage
33+
### 3. run paddlespeech_server
34+
Before using the client, it is necessary to start paddlespeech_servers.
35+
36+
Here are sample server configuration:
37+
```bash
38+
bash demos/audio_content_search/run.sh
39+
```
40+
The logs of the two services will be recorded in 'acs.log' and 'streaming_asr.log' in this configuration.
41+
42+
### 4. Usage
3443
- Command Line(Recommended)
3544
```bash
3645
# Chinese
37-
paddlespeech_client acs --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
46+
paddlespeech_client acs --server_ip 127.0.0.1 --port 8490 --input ./zh.wav
3847
```
3948

4049
Usage:

demos/audio_content_search/README_cn.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
依赖参见 requirements.txt, 安装依赖
2020

2121
```
22-
pip install -r requriement.txt
22+
pip install -r requirements.txt
2323
```
2424

2525
### 2. 准备输入
@@ -29,16 +29,26 @@ pip install -r requriement.txt
2929
```bash
3030
wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
3131
```
32-
### 3. 使用方法
32+
33+
### 3. 启动 server
34+
使用 client 之前需要先启动 paddlespeech_server。
35+
36+
可以使用默认 server 配置:
37+
```bash
38+
bash demos/audio_content_search/run.sh
39+
```
40+
该配置下两个服务的日志会被记录在 `acs.log``streaming_asr.log` 中。
41+
42+
### 4. 使用方法
3343
- 命令行 (推荐使用)
3444
```bash
3545
# 中文
36-
paddlespeech_client acs --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
46+
paddlespeech_client acs --server_ip 127.0.0.1 --port 8490 --input ./zh.wav
3747
```
3848

3949
使用方法:
4050
```bash
41-
paddlespeech acs --help
51+
paddlespeech asr --help
4252
```
4353
参数:
4454
- `input`(必须输入):用于识别的音频文件。

demos/audio_content_search/conf/ws_conformer_application.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ asr_online:
2626
sample_rate: 16000
2727
cfg_path:
2828
decode_method: 'attention_rescoring'
29+
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
2930
force_yes: True
3031
device: 'cpu' # cpu or gpu:id
32+
continuous_decoding: False # disable continue decoding when endpoint detected
3133
am_predictor_conf:
3234
device: # set 'gpu:id' or 'cpu'
3335
switch_ir_optim: True
@@ -40,4 +42,4 @@ asr_online:
4042
window_ms: 25 # ms
4143
shift_ms: 10 # ms
4244
sample_rate: 16000
43-
sample_width: 2
45+
sample_width: 2

demos/audio_content_search/conf/ws_conformer_wenetspeech_application.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ asr_online:
3131
force_yes: True
3232
device: 'cpu' # cpu or gpu:id
3333
decode_method: "attention_rescoring"
34+
num_decoding_left_chunks: -1 # number of left chunks for decoding. Defaults to -1.
3435
am_predictor_conf:
3536
device: # set 'gpu:id' or 'cpu'
3637
switch_ir_optim: True

0 commit comments

Comments
 (0)