- 账户权益管理API
- 短视频离线合成API
- 调用须知
- 常见问题
- 流式TTS-音色需报备
- 短视频作品合成、编辑和查询
- 音频作品合成、编辑和查询
- 数字人和音色模型
- 素材准备和编辑
- 直播OpenApi
- 数字人互动
根据音频生成字幕
POST
/openApiDigitalPerson/customer/createSubtitle
请求参数
Query 参数
url
string
音频链接
Header 参数
authorization
string
必需
示例值:
{{auth|md5}}
req_from
string
必需
示例值:
C
timestamp
integer
时间戳
示例值:
{{timestamp}}
app_id
string
必需
示例值:
{{appId}}
account
string
可选
示例值:
19999999999
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/openApiDigitalPerson/customer/createSubtitle?url=' \
--header 'authorization: {{auth|md5}}' \
--header 'req_from: C' \
--header 'timestamp: {{timestamp}}' \
--header 'app_id: {{appId}}' \
--header 'account: 19999999999'
返回响应
🟢200成功
application/json
Body
code
integer
必需
data
array [object {7}]
必需
text
string
文字
channelId
null
可选
beginTime
integer
开始时间
emotionValue
null
可选
silenceDuration
null
可选
speechRate
null
可选
endTime
integer
结束时间
requestId
string
必需
resultMsg
string
必需
host
string
必需
errorStackTrace
null
必需
示例
{
"code": 200,
"data": [
{
"text": "这是一段测试文字吼",
"channelId": null,
"beginTime": 0,
"emotionValue": null,
"silenceDuration": null,
"speechRate": null,
"endTime": 1737
},
{
"text": "吼吼吼吼吼、吼吼吼吼吼吼吼吼吼",
"channelId": null,
"beginTime": 1738,
"emotionValue": null,
"silenceDuration": null,
"speechRate": null,
"endTime": 4779
},
{
"text": "哈哈哈哈。哈哈哈哈哈哈",
"channelId": null,
"beginTime": 5190,
"emotionValue": null,
"silenceDuration": null,
"speechRate": null,
"endTime": 6750
}
],
"requestId": "vVVBghEw",
"resultMsg": "执行成功",
"host": "develop-005",
"errorStackTrace": null
}
修改于 2023-12-05 10:25:33