Text to Speech (SSE)

POST

Headers

Auth
X-API-KeystringRequired
Cartesia-Version"2024-06-10"RequiredDefaults to 2024-06-10

Request

This endpoint expects an object.
model_idstringRequired

The ID of the model to use for the generation. See Models for available models.

transcriptstringRequired
voiceobjectRequired
output_formatobjectRequired
languageenumOptional

The language that the given voice should speak the transcript in.

Options: English (en), French (fr), German (de), Spanish (es), Portuguese (pt), Chinese (zh), Japanese (ja), Hindi (hi), Italian (it), Korean (ko), Dutch (nl), Polish (pl), Russian (ru), Swedish (sv), Turkish (tr).

durationdoubleOptional

The maximum duration of the audio in seconds. You do not usually need to specify this. If the duration is not appropriate for the length of the transcript, the output audio may be truncated.

Response

This endpoint returns a stream of object.
Chunk
OR
Done
OR
Timestamp
OR
Error