Synthesise a text into an audio file
POST/api/v1/audios/tts
Turns a text into speech and stores it in your library, ready to be used by a campaign.
Synchronous: the response comes back only once the audio is really stored, so what you get is immediately playable. Use previewUrl to listen to the result before broadcasting it — on a synthesis this is the one moment where a mispronunciation can be caught before thousands of calls go out.
Submitting a text that was already synthesised for your account reuses the existing audio instead of producing a new one; the response then carries cached: true. The comparison is made on the normalised text, so repeated spaces and line breaks do not create a new synthesis. On a reuse the audio keeps the title of its first synthesis.
Required capability: TTS
Request
Responses
- 201
- 400
- 401
- 403
- 409
- 429
- 502
The audio has been synthesised and filed.
Empty text, or longer than 1000 characters.
Missing or invalid API key.
A capability required by this endpoint is not enabled on your account. Ask your account manager to switch it on.
The same text is being synthesised concurrently. Retry once.
Too many requests. Back off and retry.
The speech engine is unreachable or errored.