Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jiaoyou_doc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyinting
jiaoyou_doc
Commits
edaa5b9b
Commit
edaa5b9b
authored
Apr 13, 2021
by
李进峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
语音合成文档
parent
3254b195
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
103 additions
and
0 deletions
+103
-0
语音合成.md
tts/语音合成.md
+103
-0
No files found.
tts/语音合成.md
0 → 100644
View file @
edaa5b9b
-
基本地址
-
基本地址
-
测试环境: http://api-pre.heyqiwu.cn:9663
#### 获取不同声音的代号
URL: {基本地址}/api/speakers
METHOD: GET
Headers:
| key | value |
| :----------- | :------------: |
| Content-Type | application/json;charset=utf-8 |
ResponseBody:
```
json
{
"online"
:
{
//
表示在线,对外暂时只用这里面的人物声音
"ProTencent17"
:
{
//
key表示人物声音的编号
"name"
:
"腾智美(客服女声(精品))"
,
//
名称
"sex"
:
"女"
,
//
人物的性别
"mood"
:
[
"正常"
//
人物声音的情绪
],
"third_party"
:
true
//
是否是第三方的声音
}
}
}
```
Example:
```
curl --location --request GET 'http://api-pre.heyqiwu.cn:9663/api/speakers'
```
#### 合成语音
URL: {基本地址}/api/tts_ls
METHOD: GET
Headers:
| key | value |
| :----------- | :------------: |
| Content-Type | application/json;charset=utf-8 |
RequestBody:
```
json
{
"botname"
:
"12345678"
,
//
bot的帐号
"text_info_ls"
:
[
{
"person"
:
"ProTencent17"
,
//
人物声音的编号
"tone"
:
"正常"
,
//
人物声音的情绪
"text"
:
"你好,世界!"
//
需要合成的文本
},
{
"person"
:
"ProTencent17"
,
//
人物声音的编号
"tone"
:
"正常"
,
//
人物声音的情绪
"text"
:
"Hello World!"
//
需要合成的文本
}
]
}
```
ResponseBody:
```
json
{
"audio"
:
[
//
返回的顺序和text_info_ls发送顺序一致
{
"url"
:
"http://cdn-test.heyqiwu.cn/api/audio/cache/12345678/?filename=/12345678/ProTencent17/正常/5082079d92a8ef985f59e001d445ff20.mp3&exist=1"
//
合成完成之后的地址
},
{
"url"
:
"http://cdn-test.heyqiwu.cn/api/audio/cache/12345678/?filename=/12345678/ProTencent17/正常/ed076287532e86365e841e92bfc50d8c.mp3&exist=1"
//
合成完成之后的地址
}
],
"status"
:
200
//
状态码,
200
表示成功,其他表示失败
}
```
Example:
```
curl --location --request POST 'http://api-pre.heyqiwu.cn:9663/api/tts_ls' \
--header 'Content-Type: application/json' \
--data-raw '{
"botname": "12345678",
"text_info_ls": [
{
"person": "ProTencent17",
"tone":"正常",
"text": "你好,世界!"
},
{
"person": "ProTencent17",
"tone":"正常",
"text": "Hello World!"
}
]
}'
```
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment