Skip to main content
POST
cURL

TTS

De Kling TTS (Text-to-Speech)-API biedt hoogwaardige tekst-naar-spraakdiensten en ondersteunt meerdere talen en stemopties.

Referentiedocumentatie


Veelvoorkomende problemen

Voice id not found-fout

Probleembeschrijving: Wanneer voice_id niet overeenkomt met voice_language, retourneert de API de volgende fout:
Oplossing: Zorg ervoor dat de geselecteerde voice_id uw opgegeven voice_language ondersteunt. Raadpleeg de Voice ID-lijst om te controleren welke talen elke Voice ID ondersteunt.

Autorisaties

Authorization
string
header
vereist

Bearer token authentication. Use your CometAPI key.

Headers

Content-Type
string

Content type of the request body.

Body

application/json
text
string
vereist

Text to synthesize into speech. Max 1000 characters.

voice_id
string
vereist

Voice preset ID. Determines the speaker voice used for synthesis. See the Kling documentation for available voice IDs and their supported languages.

voice_language
string
vereist

Language of the selected voice. Must match the language supported by the chosen voice_id. Values: zh (Chinese) or en (English).

voice_speed
number

Speech rate multiplier. Range 0.8–2.0 (one decimal place). Values outside this range are clamped automatically.

Respons

200 - application/json

Success

code
integer
vereist

Response code. 0 means the task request was accepted.

message
string
vereist

Response message.

data
object
vereist
request_id
string

Request identifier returned by CometAPI when present.