Renders text with the given voice and returns the audio inline as base64, plus its duration and — when available — word/marker timings.
This is the editor's "listen" action, so it has editor-shaped side effects: the result is written into the slide audio cache for videoId/slideId when those are supplied, the workspace pronunciation dictionary is applied, and a VoiceCall accounting record is written.
Long-text and premium-voice permission both depend on the plan. Synthesis always uses the workspace of your token: a custom voice is checked against that workspace and you, so one narrowed to other workspaces or users is rejected as no longer available. A custom voice narrowed to some users also plays for a teammate through a videoId of a video in the workspace that speaks with it and whose owner may use it.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
The audio comes back as a base64-encoded string of an mp3, 160 kbps, 24 kHz, mono file — not a
URL and not a binary body. Decode data and write it to a file.
duration is exact rather than an estimate. markers (word boundaries) appears only when the
provider returns them and is omitted entirely when empty, so do not rely on it without testing the
provider you plan to use. For length alone, get-speech-duration
answers without synthesising anything and without a voice-call charge.
curl -X PATCH 'https://apis.elai.io/api/v1/voices' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"text": "Welcome to the product tour.",
"voice": "en-US-JennyNeural",
"provider": "azure",
"language": "English"
}'
