T2A Pro API 接口
开发环境
开发环境
POST
/v1/t2a_pro
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/v1/t2a_pro?members&reference&Type&_postman_listIndexKey=key&_postman_listAllowsMultipleValues' \
--data-raw '{
"voice_id": "male-qn-qingse", // 如同时传入voice_id和timber_weights时,则会自动忽略voice_id,以timber_weights传递的参数为准
"text": "你好",
"model": "speech-01",
"speed": 1.0,
"vol": 1.0,
"pitch": 0,
"audio_sample_rate": 24000,
"bitrate": 128000,
"timber_weights": [
{
"voice_id": "male-qn-qingse",
"weight": 1
},
{
"voice_id": "female-shaonv",
"weight": 1
},
{
"voice_id": "female-yujie",
"weight": 1
},
{
"voice_id": "audiobook_male_2",
"weight": 1
}
]
}'
响应示例响应示例
200 - 成功示例
{
"audio_file": "https://xxxxx/xxx.mp3",
"subtitle_file": "https://xxxxx/xxx.titles",
"trace_id": "xxxxxxxxxx",
"extra_info": {
"audio_length": 1946,
"audio_sample_rate": 32000,
"audio_size": 8253,
"bitrate": 32000,
"word_count": 10,
"invisible_character_ratio": 0.04
},
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}
请求参数
Query 参数
GroupId
string
必需
示例值:
$group_id
Header 参数
Authorization
string
必需
示例值:
Bearer $
{api_key}
Content-Type
string
必需
示例值:
application/json
Body 参数application/json