Speak text on a live call
speak_textRead text aloud into a live call with Vobiz TTS, supporting plain text or SSML, selectable languages, and WOMAN or MAN voices.
Instructions
Read text aloud into a LIVE call with Vobiz text-to-speech (POST /Call/{uuid}/Speak/). Use it for dynamic sentences; for a pre-recorded file use play_audio, and to connect your own AI voice agent or transcription use start_audio_stream. Plain text or SSML (type: ssml), up to 3000 characters, spoken in language (default en-US) with a WOMAN (default) or MAN voice; mix and loop work as in play_audio. Speech ends when the text finishes, or earlier with stop_speaking (stop_audio does not stop it). A call that is not live fails with call_not_active.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mix | No | true: speak over the conversation so the parties still hear each other; false: replace the leg's audio while speaking. | |
| legs | No | Which call leg the action applies to: aleg (the call's first leg, default), bleg (the leg bridged to it by <Dial>) or both. | |
| loop | No | Repeat the text until stop_speaking is called (default false). | |
| text | Yes | Text to speak, or SSML markup when type is ssml; 1-3000 characters. | |
| type | No | text (default): `text` is plain text; ssml: `text` is SSML markup for pauses, emphasis and prosody. | |
| voice | No | Voice: WOMAN (default) or MAN. | |
| language | No | Locale the text is spoken in, e.g. en-US (default), en-IN, hi-IN, de-DE; pick the one matching the text. | |
| call_uuid | Yes | UUID of the LIVE call to act on: the request_uuid returned by make_call, or a UUID from list_live_calls. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | True on success. On a failure the result is isError with ok: false plus `error` (kind), `message`, `retryable` and sometimes `http_status`. | |
| speaking | No | True once Vobiz accepted the speech request; audio starts within moments. | |
| call_uuid | No | The call UUID the action was applied to, echoed from the request. | |
| http_status | No | HTTP status Vobiz answered with: 202 when an action was accepted, 204 when one was stopped. | |
| backend_message | No | Vobiz's own confirmation text for the request, or null when it sent none. |