自定义音色

POST /kling/v1/general/custom-voices

MethodPOST
Path/kling/v1/general/custom-voices
Typehttp
Status1
Module2102810
Folder74091932

概览

MethodPOST
Path/kling/v1/general/custom-voices
Typehttp
Status1
Module2102810
Folder74091932

参数

{
  "path": [],
  "query": [],
  "cookie": [],
  "header": [
    {
      "required": false,
      "description": "",
      "type": "string",
      "id": "vJoqJYWGjO",
      "enable": true,
      "name": "Content-Type",
      "sampleValue": "application/json"
    },
    {
      "required": false,
      "description": "",
      "type": "string",
      "id": "GoglcTPvdp",
      "enable": true,
      "name": "Authorization",
      "sampleValue": "Bearer {{YOUR_API_KEY}}"
    }
  ]
}

请求体

{
  "type": "application/json",
  "parameters": [],
  "jsonSchema": {
    "type": "object",
    "properties": {
      "voice_name": {
        "type": "string",
        "description": "音色名称"
      },
      "voice_url": {
        "type": "string",
        "description": "音色数据文件获取链接\n支持.mp3/.wav/.mp4/.mov格式的音视频文件\n音频中人生需干净无杂音,有且只能有一种人声,时长不短于5秒且不长于30秒"
      },
      "video_id": {
        "type": "string",
        "description": "历史作品ID,可通过引用历史作品提供音频素材\n\n仅满足以下条件的视频可以用于定制音色:\n使用V2.6版本模型生成且开启sound参数值为on的视频\n通过数字人API生成的视频\n通过对口型API生成的视频\n音频中人生需干净无杂音,有且只能有一种人声,时长不短于5秒且不长于30秒"
      },
      "callback_url": {
        "type": "string"
      },
      "external_task_id": {
        "type": "string"
      }
    },
    "required": [
      "voice_name"
    ],
    "x-apifox-orders": [
      "voice_name",
      "voice_url",
      "video_id",
      "callback_url",
      "external_task_id"
    ]
  },
  "required": true,
  "mediaType": "",
  "examples": [],
  "oasExtensions": ""
}

响应

[
  {
    "id": 138280994,
    "name": "成功",
    "code": 200,
    "contentType": "json",
    "jsonSchema": {
      "type": "object",
      "properties": {}
    },
    "itemSchema": {},
    "description": "",
    "mediaType": "",
    "headers": []
  }
]

响应示例

[
  {
    "name": "示例 1",
    "responseId": 138280994,
    "data": "{\r\n    \"voice_name\": \"测试音色\",\r\n    \"voice_url\": \"\",\r\n    \"video_id\": \"830460928805724256\",\r\n    \"callback_url\": \"\",\r\n    \"external_task_id\": \"\"\r\n}",
    "id": "019bbb4d-d62c-7731-be06-74aafc1db20e"
  }
]