TTS
通过 CometAPI POST /kling/v1/audio/tts 调用 Kling TTS,将文本转换为语音,支持多语言音色,并提供 voice_id not found 错误的修复说明。
Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
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.
请求体
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.
响应
Success
The response is of type object.