Skip to content

【ASR】fix acs demo #3826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions demos/audio_content_search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
18 changes: 14 additions & 4 deletions demos/audio_content_search/README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
依赖参见 requirements.txt, 安装依赖

```
pip install -r requriement.txt
pip install -r requirements.txt
```

### 2. 准备输入
Expand All @@ -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`(必须输入):用于识别的音频文件。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,4 +42,4 @@ asr_online:
window_ms: 25 # ms
shift_ms: 10 # ms
sample_rate: 16000
sample_width: 2
sample_width: 2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down