Commit 8538fcd4 by 李进峰

tts添加上传npc声音定时访问接口

parent 2da78204
- 基本地址
- 基本地址
- 测试环境: https://hw-gz25.heyqiwu.cn/api/platform/tts
#### 上传npc的声音
URL: {基本地址}/api/upload/record/one_npc/v2
METHOD: POST
Headers:
| key | value |
| :----------- | :------------: |
| Content-Type | application/json;charset=utf-8 |
| Authorization | token |
| groupId | 组ID |
| mul | true |
| projectId | 项目ID |
RequestForm:
| key | value |
| :----------- | :------------: |
| botAccount | BOT帐号 |
| npcName | NPC名称 |
| sampleRate | 采样率 |
| bitRate | 比特率 |
| file | 文件 |
ResponseBody:
```json
{
"code": 1,
"msg": "成功",
"data": null
}
```
Example:
```
curl --location --request POST 'https://hw-gz25.heyqiwu.cn/api/platform/tts/api/upload/record/one_npc/v2' \
--header 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUyTWpnd056a3pOekVzSW1WNGNDSTZNVFl5T0RBNE5qVTNNU3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TXpkOS5rZ3ZkN0JRLUY4ak5DdHlJOGdLOHp0RnRSZUFhbjhzOHJHNW0zUGNsaFhzOnMwMHBlcnMzY3JldA==' \
--header 'botAccount: 6080626246' \
--header 'groupId: 49' \
--header 'mul: true' \
--header 'projectId: 1' \
--form 'botAccount="6080626246"' \
--form 'npcName="文彬"' \
--form 'sampleRate="44100"' \
--form 'bitRate="64k"' \
--form 'file=@"/home/feng/Desktop/wechatroot/tmp/文彬.zip"'
```
#### 查看上传npc的声音进度
URL: {基本地址}/api/upload/record/progress?botAccount={BOT帐号}
METHOD: GET
Headers:
| key | value |
| :----------- | :------------: |
| Content-Type | application/json;charset=utf-8 |
ResponseBody:
```json
{
"code": 1,
"msg": "成功",
"data": {
"status": 1, // 是否完成,1表示完成,0表示未完成
"progress": 100 // 进度
}
}
```
Example:
```
curl --location --request GET 'https://hw-gz25.heyqiwu.cn/api/platform/tts/api/upload/record/progress?botAccount=6080626246' \
--header 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUyTWpnd056a3pOekVzSW1WNGNDSTZNVFl5T0RBNE5qVTNNU3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TXpkOS5rZ3ZkN0JRLUY4ak5DdHlJOGdLOHp0RnRSZUFhbjhzOHJHNW0zUGNsaFhzOnMwMHBlcnMzY3JldA==' \
--header 'botAccount: 6080626246' \
--header 'groupId: 49' \
--header 'mul: true' \
--header 'projectId: 1'
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment