Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
f335bd80
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 1 年 前同步成功
通知
207
Star
8425
Fork
1598
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
245
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DeepSpeech
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
245
Issue
245
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
f335bd80
编写于
5月 13, 2022
作者:
小湉湉
提交者:
GitHub
5月 13, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1898 from lym0302/fix_cors
[server] fix cors
上级
c1198106
c5d2224d
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
193 addition
and
109 deletion
+193
-109
demos/speech_server/README.md
demos/speech_server/README.md
+23
-7
demos/speech_server/README_cn.md
demos/speech_server/README_cn.md
+84
-69
demos/speech_server/asr_client.sh
demos/speech_server/asr_client.sh
+2
-0
demos/speech_server/cls_client.sh
demos/speech_server/cls_client.sh
+2
-0
demos/speech_server/conf/application.yaml
demos/speech_server/conf/application.yaml
+2
-2
demos/speech_server/tts_client.sh
demos/speech_server/tts_client.sh
+1
-0
demos/streaming_asr_server/README.md
demos/streaming_asr_server/README.md
+19
-7
demos/streaming_asr_server/README_cn.md
demos/streaming_asr_server/README_cn.md
+12
-0
demos/streaming_asr_server/test.sh
demos/streaming_asr_server/test.sh
+2
-0
demos/streaming_tts_server/README.md
demos/streaming_tts_server/README.md
+12
-8
demos/streaming_tts_server/README_cn.md
demos/streaming_tts_server/README_cn.md
+12
-8
demos/streaming_tts_server/conf/tts_online_application.yaml
demos/streaming_tts_server/conf/tts_online_application.yaml
+1
-1
demos/streaming_tts_server/test_client.sh
demos/streaming_tts_server/test_client.sh
+3
-1
paddlespeech/server/bin/paddlespeech_client.py
paddlespeech/server/bin/paddlespeech_client.py
+2
-0
paddlespeech/server/bin/paddlespeech_server.py
paddlespeech/server/bin/paddlespeech_server.py
+10
-0
paddlespeech/server/conf/application.yaml
paddlespeech/server/conf/application.yaml
+2
-2
paddlespeech/server/conf/tts_online_application.yaml
paddlespeech/server/conf/tts_online_application.yaml
+1
-1
tests/unit/server/offline/conf/application.yaml
tests/unit/server/offline/conf/application.yaml
+1
-1
tests/unit/server/online/tts/check_server/conf/application.yaml
...unit/server/online/tts/check_server/conf/application.yaml
+1
-1
tests/unit/server/online/tts/check_server/tts_online_application.yaml
...erver/online/tts/check_server/tts_online_application.yaml
+1
-1
未找到文件。
demos/speech_server/README.md
浏览文件 @
f335bd80
...
...
@@ -52,8 +52,8 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
[
2022-02-23 11:17:32]
[
INFO]
[
on.py:26] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-02-23 11:17:32]
[
INFO]
[
on.py:38] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8090
(
Press CTRL+C to quit
)
[
2022-02-23 11:17:32]
[
INFO]
[
server.py:204] Uvicorn running on http://
127.0.0.1
:8090
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8090
(
Press CTRL+C to quit
)
[
2022-02-23 11:17:32]
[
INFO]
[
server.py:204] Uvicorn running on http://
0.0.0.0
:8090
(
Press CTRL+C to quit
)
```
...
...
@@ -75,8 +75,8 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
[
2022-02-23 14:57:56]
[
INFO]
[
on.py:26] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-02-23 14:57:56]
[
INFO]
[
on.py:38] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8090
(
Press CTRL+C to quit
)
[
2022-02-23 14:57:56]
[
INFO]
[
server.py:204] Uvicorn running on http://
127.0.0.1
:8090
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8090
(
Press CTRL+C to quit
)
[
2022-02-23 14:57:56]
[
INFO]
[
server.py:204] Uvicorn running on http://
0.0.0.0
:8090
(
Press CTRL+C to quit
)
```
...
...
@@ -84,6 +84,9 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
### 4. ASR Client Usage
**Note:**
The response time will be slightly longer when using the client for the first time
-
Command Line (Recommended)
If
`127.0.0.1`
is not accessible, you need to use the actual service IP address.
```
paddlespeech_client asr --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
```
...
...
@@ -132,6 +135,9 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
### 5. TTS Client Usage
**Note:**
The response time will be slightly longer when using the client for the first time
-
Command Line (Recommended)
If
`127.0.0.1`
is not accessible, you need to use the actual service IP address
```
bash
paddlespeech_client tts
--server_ip
127.0.0.1
--port
8090
--input
"您好,欢迎使用百度飞桨语音合成服务。"
--output
output.wav
```
...
...
@@ -192,6 +198,9 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
### 6. CLS Client Usage
**Note:**
The response time will be slightly longer when using the client for the first time
-
Command Line (Recommended)
If
`127.0.0.1`
is not accessible, you need to use the actual service IP address.
```
paddlespeech_client cls --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
```
...
...
@@ -242,9 +251,11 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
**Note:**
The response time will be slightly longer when using the client for the first time
-
Command Line (Recommended)
```
bash
paddlespeech_client vector
--task
spk
--server_ip
127.0.0.1
--port
8090
--input
85236145389.wav
```
If
`127.0.0.1`
is not accessible, you need to use the actual service IP address.
```
bash
paddlespeech_client vector
--task
spk
--server_ip
127.0.0.1
--port
8090
--input
85236145389.wav
```
*
Usage:
...
...
@@ -297,6 +308,8 @@ print(res)
-
Command Line (Recommended)
If
`127.0.0.1`
is not accessible, you need to use the actual service IP address.
```
bash
paddlespeech_client vector
--task
score
--server_ip
127.0.0.1
--port
8090
--enroll
85236145389.wav
--test
123456789.wav
```
...
...
@@ -357,6 +370,9 @@ print(res)
**Note:**
The response time will be slightly longer when using the client for the first time
-
Command Line (Recommended)
If
`127.0.0.1`
is not accessible, you need to use the actual service IP address.
```
bash
paddlespeech_client text
--server_ip
127.0.0.1
--port
8090
--input
"我认为跑步最重要的就是给我带来了身体健康"
```
...
...
demos/speech_server/README_cn.md
浏览文件 @
f335bd80
...
...
@@ -53,8 +53,8 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
[
2022-02-23 11:17:32]
[
INFO]
[
on.py:26] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-02-23 11:17:32]
[
INFO]
[
on.py:38] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8090
(
Press CTRL+C to quit
)
[
2022-02-23 11:17:32]
[
INFO]
[
server.py:204] Uvicorn running on http://
127.0.0.1
:8090
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8090
(
Press CTRL+C to quit
)
[
2022-02-23 11:17:32]
[
INFO]
[
server.py:204] Uvicorn running on http://
0.0.0.0
:8090
(
Press CTRL+C to quit
)
```
...
...
@@ -76,39 +76,42 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
[
2022-02-23 14:57:56]
[
INFO]
[
on.py:26] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-02-23 14:57:56]
[
INFO]
[
on.py:38] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8090
(
Press CTRL+C to quit
)
[
2022-02-23 14:57:56]
[
INFO]
[
server.py:204] Uvicorn running on http://
127.0.0.1
:8090
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8090
(
Press CTRL+C to quit
)
[
2022-02-23 14:57:56]
[
INFO]
[
server.py:204] Uvicorn running on http://
0.0.0.0
:8090
(
Press CTRL+C to quit
)
```
### 4. ASR 客户端使用方法
**注意:**
初次使用客户端时响应时间会略长
-
命令行 (推荐使用)
```
paddlespeech_client asr --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
```
若
`127.0.0.1`
不能访问,则需要使用实际服务 IP 地址
使用帮助:
```
bash
paddlespeech_client asr
--help
```
```
paddlespeech_client asr --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
参数:
- `server_ip`: 服务端ip地址,默认: 127.0.0.1。
- `port`: 服务端口,默认: 8090。
- `input`(必须输入): 用于识别的音频文件。
- `sample_rate`: 音频采样率,默认值:16000。
- `lang`: 模型语言,默认值:zh_cn。
- `audio_format`: 音频格式,默认值:wav。
```
输出:
使用帮助:
```
bash
paddlespeech_client asr
--help
```
参数:
-
`server_ip`
: 服务端ip地址,默认: 127.0.0.1。
-
`port`
: 服务端口,默认: 8090。
-
`input`
(必须输入): 用于识别的音频文件。
-
`sample_rate`
: 音频采样率,默认值:16000。
-
`lang`
: 模型语言,默认值:zh_cn。
-
`audio_format`
: 音频格式,默认值:wav。
输出:
```bash
[2022-02-23 18:11:22,819] [ INFO] - {'success': True, 'code': 200, 'message': {'description': 'success'}, 'result': {'transcription': '我认为跑步最重要的就是给我带来了身体健康'}}
[2022-02-23 18:11:22,820] [ INFO] - time cost 0.689145 s.
```
```
bash
[
2022-02-23 18:11:22,819]
[
INFO] -
{
'success'
: True,
'code'
: 200,
'message'
:
{
'description'
:
'success'
}
,
'result'
:
{
'transcription'
:
'我认为跑步最重要的就是给我带来了身体健康'
}}
[
2022-02-23 18:11:22,820]
[
INFO] -
time
cost 0.689145 s.
```
-
Python API
```
python
...
...
@@ -135,33 +138,35 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
### 5. TTS 客户端使用方法
**注意:**
初次使用客户端时响应时间会略长
-
命令行 (推荐使用)
```bash
paddlespeech_client tts --server_ip 127.0.0.1 --port 8090 --input "您好,欢迎使用百度飞桨语音合成服务。" --output output.wav
```
使用帮助:
```
bash
paddlespeech_client tts
--help
```
参数:
- `server_ip`: 服务端ip地址,默认: 127.0.0.1。
- `port`: 服务端口,默认: 8090。
- `input`(必须输入): 待合成的文本。
- `spk_id`: 说话人 id,用于多说话人语音合成,默认值: 0。
- `speed`: 音频速度,该值应设置在 0 到 3 之间。 默认值:1.0
- `volume`: 音频音量,该值应设置在 0 到 3 之间。 默认值: 1.0
- `sample_rate`: 采样率,可选 [0, 8000, 16000],默认与模型相同。 默认值:0
- `output`: 输出音频的路径, 默认值:None,表示不保存音频到本地。
输出:
```bash
[2022-02-23 15:20:37,875] [ INFO] - {'description': 'success.'}
[2022-02-23 15:20:37,875] [ INFO] - Save synthesized audio successfully on output.wav.
[2022-02-23 15:20:37,875] [ INFO] - Audio duration: 3.612500 s.
[2022-02-23 15:20:37,875] [ INFO] - Response time: 0.348050 s.
```
若
`127.0.0.1`
不能访问,则需要使用实际服务 IP 地址
```
bash
paddlespeech_client tts
--server_ip
127.0.0.1
--port
8090
--input
"您好,欢迎使用百度飞桨语音合成服务。"
--output
output.wav
```
使用帮助:
```
bash
paddlespeech_client tts
--help
```
参数:
-
`server_ip`
: 服务端ip地址,默认: 127.0.0.1。
-
`port`
: 服务端口,默认: 8090。
-
`input`
(必须输入): 待合成的文本。
-
`spk_id`
: 说话人 id,用于多说话人语音合成,默认值: 0。
-
`speed`
: 音频速度,该值应设置在 0 到 3 之间。 默认值:1.0
-
`volume`
: 音频音量,该值应设置在 0 到 3 之间。 默认值: 1.0
-
`sample_rate`
: 采样率,可选 [0, 8000, 16000],默认与模型相同。 默认值:0
-
`output`
: 输出音频的路径, 默认值:None,表示不保存音频到本地。
输出:
```
bash
[
2022-02-23 15:20:37,875]
[
INFO] -
{
'description'
:
'success.'
}
[
2022-02-23 15:20:37,875]
[
INFO] - Save synthesized audio successfully on output.wav.
[
2022-02-23 15:20:37,875]
[
INFO] - Audio duration: 3.612500 s.
[
2022-02-23 15:20:37,875]
[
INFO] - Response
time
: 0.348050 s.
```
-
Python API
```
python
...
...
@@ -197,9 +202,12 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
**注意:**
初次使用客户端时响应时间会略长
-
命令行 (推荐使用)
```
paddlespeech_client cls --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
```
若
`127.0.0.1`
不能访问,则需要使用实际服务 IP 地址
```
paddlespeech_client cls --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
```
使用帮助:
...
...
@@ -247,15 +255,17 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespee
注意: 初次使用客户端时响应时间会略长
*
命令行 (推荐使用)
```
bash
paddlespeech_client vector
--task
spk
--server_ip
127.0.0.1
--port
8090
--input
85236145389.wav
```
若
`127.0.0.1`
不能访问,则需要使用实际服务 IP 地址
```
bash
paddlespeech_client vector
--task
spk
--server_ip
127.0.0.1
--port
8090
--input
85236145389.wav
```
*
使用帮助:
```
bash
paddlespeech_client vector
--help
```
```
bash
paddlespeech_client vector
--help
```
*
参数:
*
server_ip: 服务端ip地址,默认: 127.0.0.1。
*
port: 服务端口,默认: 8090。
...
...
@@ -299,15 +309,17 @@ print(res)
注意: 初次使用客户端时响应时间会略长
*
命令行 (推荐使用)
```
bash
paddlespeech_client vector
--task
score
--server_ip
127.0.0.1
--port
8090
--enroll
85236145389.wav
--test
123456789.wav
```
若
`127.0.0.1`
不能访问,则需要使用实际服务 IP 地址
```
bash
paddlespeech_client vector
--task
score
--server_ip
127.0.0.1
--port
8090
--enroll
85236145389.wav
--test
123456789.wav
```
*
使用帮助:
```
bash
paddlespeech_client vector
--help
```
```
bash
paddlespeech_client vector
--help
```
*
参数:
*
server_ip: 服务端ip地址,默认: 127.0.0.1。
...
...
@@ -357,9 +369,12 @@ print(res)
**注意:**
初次使用客户端时响应时间会略长
-
命令行 (推荐使用)
```
bash
paddlespeech_client text
--server_ip
127.0.0.1
--port
8090
--input
"我认为跑步最重要的就是给我带来了身体健康"
```
若
`127.0.0.1`
不能访问,则需要使用实际服务 IP 地址
```
bash
paddlespeech_client text
--server_ip
127.0.0.1
--port
8090
--input
"我认为跑步最重要的就是给我带来了身体健康"
```
使用帮助:
...
...
@@ -409,4 +424,4 @@ print(res)
通过
`paddlespeech_server stats --task vector`
获取Vector服务支持的所有模型。
### Text支持的模型
通过
`paddlespeech_server stats --task text`
获取Text服务支持的所有模型。
\ No newline at end of file
通过
`paddlespeech_server stats --task text`
获取Text服务支持的所有模型。
demos/speech_server/asr_client.sh
浏览文件 @
f335bd80
#!/bin/bash
wget
-c
https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespeech.bj.bcebos.com/PaddleAudio/en.wav
# If `127.0.0.1` is not accessible, you need to use the actual service IP address.
paddlespeech_client asr
--server_ip
127.0.0.1
--port
8090
--input
./zh.wav
demos/speech_server/cls_client.sh
浏览文件 @
f335bd80
#!/bin/bash
wget
-c
https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav https://paddlespeech.bj.bcebos.com/PaddleAudio/en.wav
# If `127.0.0.1` is not accessible, you need to use the actual service IP address.
paddlespeech_client cls
--server_ip
127.0.0.1
--port
8090
--input
./zh.wav
--topk
1
demos/speech_server/conf/application.yaml
浏览文件 @
f335bd80
...
...
@@ -3,7 +3,7 @@
#################################################################################
# SERVER SETTING #
#################################################################################
host
:
127.0.0.1
host
:
0.0.0.0
port
:
8090
# The task format in the engin_list is: <speech task>_<engine type>
...
...
@@ -157,4 +157,4 @@ vector_python:
sample_rate
:
16000
cfg_path
:
# [optional]
ckpt_path
:
# [optional]
device
:
# set 'gpu:id' or 'cpu'
\ No newline at end of file
device
:
# set 'gpu:id' or 'cpu'
demos/speech_server/tts_client.sh
浏览文件 @
f335bd80
#!/bin/bash
# If `127.0.0.1` is not accessible, you need to use the actual service IP address.
paddlespeech_client tts
--server_ip
127.0.0.1
--port
8090
--input
"您好,欢迎使用百度飞桨语音合成服务。"
--output
output.wav
demos/streaming_asr_server/README.md
浏览文件 @
f335bd80
...
...
@@ -119,9 +119,12 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
**Note:**
The response time will be slightly longer when using the client for the first time
-
Command Line (Recommended)
```
paddlespeech_client asr_online --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
```
If
`127.0.0.1`
is not accessible, you need to use the actual service IP address.
```
paddlespeech_client asr_online --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
```
Usage:
...
...
@@ -374,10 +377,13 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
### 2. Client usage
**Note**
The response time will be slightly longer when using the client for the first time
-
Command line
```
paddlespeech_client text --server_ip 127.0.0.1 --port 8190 --input "我认为跑步最重要的就是给我带来了身体健康"
```
-
Command line:
If
`127.0.0.1`
is not accessible, you need to use the actual service IP address.
```
paddlespeech_client text --server_ip 127.0.0.1 --port 8190 --input "我认为跑步最重要的就是给我带来了身体健康"
```
Output
```
...
...
@@ -419,6 +425,9 @@ bash server.sh
### 2. Call client
-
Command line
If
`127.0.0.1`
is not accessible, you need to use the actual service IP address.
```
paddlespeech_client asr_online --server_ip 127.0.0.1 --port 8290 --punc.server_ip 127.0.0.1 --punc.port 8190 --input ./zh.wav
```
...
...
@@ -494,6 +503,9 @@ bash server.sh
```
-
Use script
If
`127.0.0.1`
is not accessible, you need to use the actual service IP address.
```
python3 websocket_client.py --server_ip 127.0.0.1 --port 8290 --punc.server_ip 127.0.0.1 --punc.port 8190 --wavfile ./zh.wav
```
...
...
demos/streaming_asr_server/README_cn.md
浏览文件 @
f335bd80
...
...
@@ -125,6 +125,9 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
**注意:**
初次使用客户端时响应时间会略长
-
命令行 (推荐使用)
若
`127.0.0.1`
不能访问,则需要使用实际服务 IP 地址
```
paddlespeech_client asr_online --server_ip 127.0.0.1 --port 8090 --input ./zh.wav
```
...
...
@@ -384,6 +387,9 @@ wget -c https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
**注意:**
初次使用客户端时响应时间会略长
-
命令行 (推荐使用)
若
`127.0.0.1`
不能访问,则需要使用实际服务 IP 地址
```
paddlespeech_client text --server_ip 127.0.0.1 --port 8190 --input "我认为跑步最重要的就是给我带来了身体健康"
```
...
...
@@ -427,6 +433,9 @@ bash server.sh
### 2. 调用服务
-
使用命令行:
若
`127.0.0.1`
不能访问,则需要使用实际服务 IP 地址
```
paddlespeech_client asr_online --server_ip 127.0.0.1 --port 8290 --punc.server_ip 127.0.0.1 --punc.port 8190 --input ./zh.wav
```
...
...
@@ -502,6 +511,9 @@ bash server.sh
```
-
使用脚本调用
若
`127.0.0.1`
不能访问,则需要使用实际服务 IP 地址
```
python3 websocket_client.py --server_ip 127.0.0.1 --port 8290 --punc.server_ip 127.0.0.1 --punc.port 8190 --wavfile ./zh.wav
```
...
...
demos/streaming_asr_server/test.sh
浏览文件 @
f335bd80
...
...
@@ -2,9 +2,11 @@
wget
-c
https://paddlespeech.bj.bcebos.com/PaddleAudio/zh.wav
# read the wav and pass it to only streaming asr service
# If `127.0.0.1` is not accessible, you need to use the actual service IP address.
# python3 websocket_client.py --server_ip 127.0.0.1 --port 8290 --wavfile ./zh.wav
paddlespeech_client asr_online
--server_ip
127.0.0.1
--port
8290
--input
./zh.wav
# read the wav and call streaming and punc service
# If `127.0.0.1` is not accessible, you need to use the actual service IP address.
# python3 websocket_client.py --server_ip 127.0.0.1 --port 8290 --punc.server_ip 127.0.0.1 --punc.port 8190 --wavfile ./zh.wav
paddlespeech_client asr_online
--server_ip
127.0.0.1
--port
8290
--punc
.server_ip 127.0.0.1
--punc
.port 8190
--input
./zh.wav
\ No newline at end of file
demos/streaming_tts_server/README.md
浏览文件 @
f335bd80
...
...
@@ -63,8 +63,8 @@ The configuration file can be found in `conf/tts_online_application.yaml`.
[
2022-04-24 20:05:28]
[
INFO]
[
on.py:45] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-04-24 20:05:28]
[
INFO]
[
on.py:59] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
[
2022-04-24 20:05:28]
[
INFO]
[
server.py:211] Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
[
2022-04-24 20:05:28]
[
INFO]
[
server.py:211] Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
```
...
...
@@ -90,8 +90,8 @@ The configuration file can be found in `conf/tts_online_application.yaml`.
[
2022-04-24 21:00:17]
[
INFO]
[
on.py:45] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-04-24 21:00:17]
[
INFO]
[
on.py:59] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
[
2022-04-24 21:00:17]
[
INFO]
[
server.py:211] Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
[
2022-04-24 21:00:17]
[
INFO]
[
server.py:211] Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
```
...
...
@@ -101,6 +101,8 @@ The configuration file can be found in `conf/tts_online_application.yaml`.
Access http streaming TTS service:
If `127.0.0.1` is not accessible, you need to use the actual service IP address.
```bash
paddlespeech_client tts_online --server_ip 127.0.0.1 --port 8092 --protocol http --input "您好,欢迎使用百度飞桨语音合成服务。" --output output.wav
```
...
...
@@ -198,8 +200,8 @@ The configuration file can be found in `conf/tts_online_application.yaml`.
[
2022-04-27 10:18:09]
[
INFO]
[
on.py:45] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-04-27 10:18:09]
[
INFO]
[
on.py:59] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
[
2022-04-27 10:18:09]
[
INFO]
[
server.py:211] Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
[
2022-04-27 10:18:09]
[
INFO]
[
server.py:211] Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
```
...
...
@@ -226,8 +228,8 @@ The configuration file can be found in `conf/tts_online_application.yaml`.
[
2022-04-27 10:20:16]
[
INFO]
[
on.py:45] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-04-27 10:20:16]
[
INFO]
[
on.py:59] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
[
2022-04-27 10:20:16]
[
INFO]
[
server.py:211] Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
[
2022-04-27 10:20:16]
[
INFO]
[
server.py:211] Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
```
...
...
@@ -236,6 +238,8 @@ The configuration file can be found in `conf/tts_online_application.yaml`.
Access websocket streaming TTS service:
If `127.0.0.1` is not accessible, you need to use the actual service IP address.
```bash
paddlespeech_client tts_online --server_ip 127.0.0.1 --port 8092 --protocol websocket --input "您好,欢迎使用百度飞桨语音合成服务。" --output output.wav
```
...
...
demos/streaming_tts_server/README_cn.md
浏览文件 @
f335bd80
...
...
@@ -62,8 +62,8 @@
[
2022-04-24 20:05:28]
[
INFO]
[
on.py:45] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-04-24 20:05:28]
[
INFO]
[
on.py:59] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
[
2022-04-24 20:05:28]
[
INFO]
[
server.py:211] Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
[
2022-04-24 20:05:28]
[
INFO]
[
server.py:211] Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
```
...
...
@@ -89,8 +89,8 @@
[
2022-04-24 21:00:17]
[
INFO]
[
on.py:45] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-04-24 21:00:17]
[
INFO]
[
on.py:59] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
[
2022-04-24 21:00:17]
[
INFO]
[
server.py:211] Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
[
2022-04-24 21:00:17]
[
INFO]
[
server.py:211] Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
```
...
...
@@ -100,6 +100,8 @@
访问 http 流式TTS服务:
若 `127.0.0.1` 不能访问,则需要使用实际服务 IP 地址
```bash
paddlespeech_client tts_online --server_ip 127.0.0.1 --port 8092 --protocol http --input "您好,欢迎使用百度飞桨语音合成服务。" --output output.wav
```
...
...
@@ -198,8 +200,8 @@
[
2022-04-27 10:18:09]
[
INFO]
[
on.py:45] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-04-27 10:18:09]
[
INFO]
[
on.py:59] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
[
2022-04-27 10:18:09]
[
INFO]
[
server.py:211] Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
[
2022-04-27 10:18:09]
[
INFO]
[
server.py:211] Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
```
...
...
@@ -226,8 +228,8 @@
[
2022-04-27 10:20:16]
[
INFO]
[
on.py:45] Waiting
for
application startup.
INFO: Application startup complete.
[
2022-04-27 10:20:16]
[
INFO]
[
on.py:59] Application startup complete.
INFO: Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
[
2022-04-27 10:20:16]
[
INFO]
[
server.py:211] Uvicorn running on http://
127.0.0.1
:8092
(
Press CTRL+C to quit
)
INFO: Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
[
2022-04-27 10:20:16]
[
INFO]
[
server.py:211] Uvicorn running on http://
0.0.0.0
:8092
(
Press CTRL+C to quit
)
```
...
...
@@ -236,6 +238,8 @@
访问 websocket 流式TTS服务:
若 `127.0.0.1` 不能访问,则需要使用实际服务 IP 地址
```bash
paddlespeech_client tts_online --server_ip 127.0.0.1 --port 8092 --protocol websocket --input "您好,欢迎使用百度飞桨语音合成服务。" --output output.wav
```
...
...
demos/streaming_tts_server/conf/tts_online_application.yaml
浏览文件 @
f335bd80
...
...
@@ -3,7 +3,7 @@
#################################################################################
# SERVER SETTING #
#################################################################################
host
:
127.0.0.1
host
:
0.0.0.0
port
:
8092
# The task format in the engin_list is: <speech task>_<engine type>
...
...
demos/streaming_tts_server/test_client.sh
浏览文件 @
f335bd80
#!/bin/bash
# http client test
# If `127.0.0.1` is not accessible, you need to use the actual service IP address.
paddlespeech_client tts_online
--server_ip
127.0.0.1
--port
8092
--protocol
http
--input
"您好,欢迎使用百度飞桨语音合成服务。"
--output
output.wav
# websocket client test
#paddlespeech_client tts_online --server_ip 127.0.0.1 --port 8092 --protocol websocket --input "您好,欢迎使用百度飞桨语音合成服务。" --output output.wav
# If `127.0.0.1` is not accessible, you need to use the actual service IP address.
# paddlespeech_client tts_online --server_ip 127.0.0.1 --port 8092 --protocol websocket --input "您好,欢迎使用百度飞桨语音合成服务。" --output output.wav
paddlespeech/server/bin/paddlespeech_client.py
浏览文件 @
f335bd80
...
...
@@ -20,6 +20,7 @@ import os
import
random
import
sys
import
time
import
warnings
from
typing
import
List
import
numpy
as
np
...
...
@@ -34,6 +35,7 @@ from paddlespeech.server.utils.audio_handler import ASRWsAudioHandler
from
paddlespeech.server.utils.audio_process
import
wav2pcm
from
paddlespeech.server.utils.util
import
compute_delay
from
paddlespeech.server.utils.util
import
wav2base64
warnings
.
filterwarnings
(
"ignore"
)
__all__
=
[
'TTSClientExecutor'
,
'TTSOnlineClientExecutor'
,
'ASRClientExecutor'
,
...
...
paddlespeech/server/bin/paddlespeech_server.py
浏览文件 @
f335bd80
...
...
@@ -13,11 +13,13 @@
# limitations under the License.
import
argparse
import
sys
import
warnings
from
typing
import
List
import
uvicorn
from
fastapi
import
FastAPI
from
prettytable
import
PrettyTable
from
starlette.middleware.cors
import
CORSMiddleware
from
..executor
import
BaseExecutor
from
..util
import
cli_server_register
...
...
@@ -27,12 +29,20 @@ from paddlespeech.server.engine.engine_pool import init_engine_pool
from
paddlespeech.server.restful.api
import
setup_router
as
setup_http_router
from
paddlespeech.server.utils.config
import
get_config
from
paddlespeech.server.ws.api
import
setup_router
as
setup_ws_router
warnings
.
filterwarnings
(
"ignore"
)
__all__
=
[
'ServerExecutor'
,
'ServerStatsExecutor'
]
app
=
FastAPI
(
title
=
"PaddleSpeech Serving API"
,
description
=
"Api"
,
version
=
"0.0.1"
)
app
.
add_middleware
(
CORSMiddleware
,
allow_origins
=
[
"*"
],
allow_credentials
=
True
,
allow_methods
=
[
"*"
],
allow_headers
=
[
"*"
])
@
cli_server_register
(
name
=
'paddlespeech_server.start'
,
description
=
'Start the service'
)
...
...
paddlespeech/server/conf/application.yaml
浏览文件 @
f335bd80
...
...
@@ -3,7 +3,7 @@
#################################################################################
# SERVER SETTING #
#################################################################################
host
:
127.0.0.1
host
:
0.0.0.0
port
:
8090
# The task format in the engin_list is: <speech task>_<engine type>
...
...
@@ -157,4 +157,4 @@ vector_python:
sample_rate
:
16000
cfg_path
:
# [optional]
ckpt_path
:
# [optional]
device
:
# set 'gpu:id' or 'cpu'
\ No newline at end of file
device
:
# set 'gpu:id' or 'cpu'
paddlespeech/server/conf/tts_online_application.yaml
浏览文件 @
f335bd80
...
...
@@ -3,7 +3,7 @@
#################################################################################
# SERVER SETTING #
#################################################################################
host
:
127.0.0.1
host
:
0.0.0.0
port
:
8092
# The task format in the engin_list is: <speech task>_<engine type>
...
...
tests/unit/server/offline/conf/application.yaml
浏览文件 @
f335bd80
...
...
@@ -3,7 +3,7 @@
#################################################################################
# SERVER SETTING #
#################################################################################
host
:
127.0.0.1
host
:
0.0.0.0
port
:
8090
# The task format in the engin_list is: <speech task>_<engine type>
...
...
tests/unit/server/online/tts/check_server/conf/application.yaml
浏览文件 @
f335bd80
...
...
@@ -3,7 +3,7 @@
#################################################################################
# SERVER SETTING #
#################################################################################
host
:
127.0.0.1
host
:
0.0.0.0
port
:
8092
# The task format in the engin_list is: <speech task>_<engine type>
...
...
tests/unit/server/online/tts/check_server/tts_online_application.yaml
浏览文件 @
f335bd80
...
...
@@ -3,7 +3,7 @@
#################################################################################
# SERVER SETTING #
#################################################################################
host
:
127.0.0.1
host
:
0.0.0.0
port
:
8092
# The task format in the engin_list is: <speech task>_<engine type>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录