TTS
Gọi Kling TTS qua CometAPI POST /kling/v1/audio/tts để chuyển văn bản thành giọng nói với các giọng đọc đa ngôn ngữ, cùng cách khắc phục lỗi không tìm thấy voice_id.
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
API Kling TTS (Text-to-Speech) cung cấp dịch vụ chuyển văn bản thành giọng nói chất lượng cao, hỗ trợ nhiều ngôn ngữ và tùy chọn giọng đọc.Tài liệu tham khảo
- API Reference: Tài liệu API Kling TTS
- Voice ID List: Tham khảo Voice ID khả dụng
Các vấn đề thường gặp
Lỗi không tìm thấy Voice id
Mô tả vấn đề: Khivoice_id không khớp với voice_language, API sẽ trả về lỗi sau:
voice_id đã chọn hỗ trợ voice_language mà bạn chỉ định. Tham khảo Voice ID List để kiểm tra mỗi voice ID hỗ trợ những ngôn ngữ nào.Ủy quyền
Bearer token authentication. Use your CometAPI key.
Tiêu đề
Content type of the request body.
Nội dung
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.
Phản hồi
Success
The response is of type object.