Kling
创建 Kling 语音
通过 CometAPI POST /kling/v1/audio/tts 调用 Kling TTS,将文本转换为语音,并提供 voice_id not found 错误的修复方法。
POST
cURL
TTS
Kling TTS(文本转语音)API 提供高质量的文本转语音服务,支持多种语言和语音选项。参考文档
- API 参考:Kling TTS API 文档
- Voice ID 列表:可用 Voice ID 参考
常见问题
Voice id not found 错误
问题描述:当voice_id 与 voice_language 不匹配时,API 会返回以下错误:
voice_id 支持你指定的 voice_language。请参考 Voice ID 列表,查看每个 voice ID 支持哪些语言。授权
Bearer token authentication. Use your CometAPI key.
请求头
Content type of the request body.
请求体
application/json
Text to synthesize into speech. Max 1000 characters.
Voice preset ID. Determines the speaker voice used for synthesis. See the Kling documentation for available voice IDs and their supported languages.
Language of the selected voice. Must match the language supported by the chosen voice_id. Values: zh (Chinese) or en (English).
Speech rate multiplier. Range 0.8–2.0 (one decimal place). Values outside this range are clamped automatically.