提交 59864953 编写于 作者: L lym0302

remove wavfile, test=doc

上级 bb60561c
...@@ -15,6 +15,13 @@ You can choose one way from easy, meduim and hard to install paddlespeech. ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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
...@@ -214,4 +221,4 @@ Here is a list of **TTS pretrained static models** released by PaddleSpeech, bot ...@@ -214,4 +221,4 @@ Here is a list of **TTS pretrained static models** released by PaddleSpeech, bot
| :--- | :---: | | :--- | :---: |
| pwgan_csmsc| zh | pwgan_csmsc| zh
| mb_melgan_csmsc| zh | mb_melgan_csmsc| zh
| hifigan_csmsc| zh | hifigan_csmsc| zh
\ No newline at end of file
...@@ -15,6 +15,13 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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 @@ ...@@ -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.
``` ```
...@@ -213,4 +219,4 @@ ...@@ -213,4 +219,4 @@
| :--- | :---: | | :--- | :---: |
| pwgan_csmsc| zh | pwgan_csmsc| zh
| mb_melgan_csmsc| zh | mb_melgan_csmsc| zh
| hifigan_csmsc| zh | hifigan_csmsc| zh
\ No newline at end of file
#!/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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册