TTS
CometAPI 経由で Kling TTS の POST /kling/v1/audio/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(Text-to-Speech)API は高品質なテキスト読み上げサービスを提供し、複数の言語と音声オプションをサポートしています。リファレンスドキュメント
- API リファレンス: Kling TTS API Documentation
- 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.