remove wavfile, test=doc

pull/1480/head
lym0302 4 years ago
parent bb60561c66
commit 59864953c7

Binary file not shown.

@ -15,6 +15,13 @@ You can choose one way from easy, meduim and hard to install paddlespeech.
### 2. Prepare config File ### 2. Prepare config File
The configuration file contains the service-related configuration files and the model configuration related to the voice tasks contained in the service. They are all under the `conf` folder. The configuration file contains the service-related configuration files and the model configuration related to the voice tasks contained in the service. They are all under the `conf` folder.
The input of ASR client demo should be a WAV file(`.wav`), and the sample rate must be the same as the model.
Here are sample files for thisASR client demo that can be downloaded:
```bash
wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespeech.bj.bcebos.com/PaddleAudio/en.wav
```
### 3. Server Usage ### 3. Server Usage
- Command Line (Recommended) - Command Line (Recommended)
@ -71,7 +78,7 @@ The configuration file contains the service-related configuration files and the
### 4. ASR Client Usage ### 4. ASR Client Usage
- Command Line (Recommended) - Command Line (Recommended)
``` ```
paddlespeech_client asr --server_ip 127.0.0.1 --port 8090 --input ./16_audio.wav paddlespeech_client asr --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
``` ```
Usage: Usage:
@ -89,8 +96,9 @@ The configuration file contains the service-related configuration files and the
Output: Output:
```bash ```bash
[2022-02-23 11:19:45,646] [ INFO] - {'success': True, 'code': 200, 'message': {'description': 'success'}, 'result': {'transcription': '广州医生跑北马中断比赛就心跳骤停者'}} [2022-02-23 18:11:22,819] [ INFO] - {'success': True, 'code': 200, 'message': {'description': 'success'}, 'result': {'transcription': '我认为跑步最重要的就是给我带来了身体健康'}}
[2022-02-23 11:19:45,646] [ INFO] - time cost 0.659491 s. [2022-02-23 18:11:22,820] [ INFO] - time cost 0.689145 s.
``` ```
- Python API - Python API
@ -99,7 +107,7 @@ The configuration file contains the service-related configuration files and the
asrclient_executor = ASRClientExecutor() asrclient_executor = ASRClientExecutor()
asrclient_executor( asrclient_executor(
input="./16_audio.wav", input="./zh.wav",
server_ip="127.0.0.1", server_ip="127.0.0.1",
port=8090, port=8090,
sample_rate=16000, sample_rate=16000,
@ -109,9 +117,8 @@ The configuration file contains the service-related configuration files and the
Output: Output:
```bash ```bash
{'success': True, 'code': 200, 'message': {'description': 'success'}, 'result': {'transcription': '广州医生跑北马中断比赛就心跳骤停者'}} {'success': True, 'code': 200, 'message': {'description': 'success'}, 'result': {'transcription': '我认为跑步最重要的就是给我带来了身体健康'}}
time cost 0.802639 s. time cost 0.604353 s.
``` ```
### 5. TTS Client Usage ### 5. TTS Client Usage

@ -15,6 +15,13 @@
### 2. 准备配置文件 ### 2. 准备配置文件
配置文件包含服务相关的配置文件和服务中包含的语音任务相关的模型配置。 它们都在 `conf` 文件夹下。 配置文件包含服务相关的配置文件和服务中包含的语音任务相关的模型配置。 它们都在 `conf` 文件夹下。
这个 ASR client 的输入应该是一个 WAV 文件(`.wav`),并且采样率必须与模型的采样率相同。
可以下载此 ASR client的示例音频
```bash
wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespeech.bj.bcebos.com/PaddleAudio/en.wav
```
### 3. 服务端使用方法 ### 3. 服务端使用方法
- 命令行 (推荐使用) - 命令行 (推荐使用)
@ -70,7 +77,7 @@
### 4. ASR客户端使用方法 ### 4. ASR客户端使用方法
- 命令行 (推荐使用) - 命令行 (推荐使用)
``` ```
paddlespeech_client asr --server_ip 127.0.0.1 --port 8090 --input ./paddlespeech/server/tests/16_audio.wav paddlespeech_client asr --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
``` ```
使用帮助: 使用帮助:
@ -90,9 +97,8 @@
输出: 输出:
```bash ```bash
[2022-02-23 11:19:45,646] [ INFO] - {'success': True, 'code': 200, 'message': {'description': 'success'}, 'result': {'transcription': '广州医生跑北马中断比赛就心跳骤停者'}} [2022-02-23 18:11:22,819] [ INFO] - {'success': True, 'code': 200, 'message': {'description': 'success'}, 'result': {'transcription': '我认为跑步最重要的就是给我带来了身体健康'}}
[2022-02-23 11:19:45,646] [ INFO] - time cost 0.659491 s. [2022-02-23 18:11:22,820] [ INFO] - time cost 0.689145 s.
``` ```
- Python API - Python API
@ -101,7 +107,7 @@
asrclient_executor = ASRClientExecutor() asrclient_executor = ASRClientExecutor()
asrclient_executor( asrclient_executor(
input="./16_audio.wav", input="./zh.wav",
server_ip="127.0.0.1", server_ip="127.0.0.1",
port=8090, port=8090,
sample_rate=16000, sample_rate=16000,
@ -111,8 +117,8 @@
输出: 输出:
```bash ```bash
{'success': True, 'code': 200, 'message': {'description': 'success'}, 'result': {'transcription': '广州医生跑北马中断比赛就心跳骤停者'}} {'success': True, 'code': 200, 'message': {'description': 'success'}, 'result': {'transcription': '我认为跑步最重要的就是给我带来了身体健康'}}
time cost 0.802639 s. time cost 0.604353 s.
``` ```

@ -1,3 +1,4 @@
#!/bin/bash #!/bin/bash
paddlespeech_client asr --server_ip 127.0.0.1 --port 8090 --input ./16_audio.wav wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespeech.bj.bcebos.com/PaddleAudio/en.wav
paddlespeech_client asr --server_ip 127.0.0.1 --port 8090 --input ./zh.wav

Loading…
Cancel
Save