语音合成
POST /kling/v1/audio/tts
概览
| Method | POST |
|---|---|
| Path | /kling/v1/audio/tts |
| Type | http |
| Status | -1 |
| Module | 2102810 |
| Folder | 72921797 |
参数
{ "header": [ { "required": false, "description": "", "type": "string", "id": "r7u5Oc9QDf", "enable": true, "name": "Content-Type", "sampleValue": "application/json" }, { "required": false, "description": "", "type": "string", "id": "HhWhjv91tm", "enable": true, "name": "Authorization", "sampleValue": "Bearer {{YOUR_API_KEY}}" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "text": { "type": "string", "description": "合成音频的文案;文本内容最大长度1000,内容过长会返回错误码等信息;系统会校验文本内容,如有问题会返回错误码等信息" }, "voice_id": { "type": "string", "description": "音色ID 系统提供多种音色可供选择,具体音色效果、音色ID、音色语种对应关系;音色试听不支持自定义文案 音色试听文件命名规范:音色名称#音色ID#音色语种 语音合成目前仅支持官方音色哈,不支持自定义音色" }, "voice_language": { "type": "string", "description": "合成音频的文案;文本内容最大长度1000,内容过长会返回错误码等信息;系统会校验文本内容,如有问题会返回错误码等信息" }, "voice_speed": { "type": "integer", "description": "语速有效范围:0.8~2.0,精确至小数点后1位,超出部分将自动四舍五入" } }, "required": [ "text", "voice_id", "voice_language" ], "x-apifox-orders": [ "text", "voice_id", "voice_language", "voice_speed" ] }, "required": true, "mediaType": "", "examples": [ { "mediaType": "application/json", "value": "{\r\n \"text\": \"描述看到的画面\",\r\n \"voice_id\": \"genshin_vindi2\",\r\n \"voice_language\": \"zh\",\r\n \"voice_speed\": \"1.0\"\r\n}" } ], "oasExtensions": "" }
响应
[ { "id": 188126035, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": {} }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [] } ]