Voice API
Use thespeak command to play TTS on an active call:
TeXML
Use the<Say> element:
<Say> reference.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Check out our upcoming events and meetups! View events →
Play Telnyx text-to-speech audio during live voice calls using the Programmable Voice API or TeXML, with options for streaming and per-call voice selection.
speak command to play TTS on an active call:
curl --location 'https://api.telnyx.com/v2/calls/{call_control_id}/actions/speak' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data '{
"voice": "Telnyx.Ultra.3e1ed423-17e5-4773-b87c-25b031106e41"
}'
<Say> element:
<Response>
<Say voice="Telnyx.NaturalHD.astra">Your appointment is confirmed for tomorrow at 3 PM.</Say>
</Response>
<Say> reference.
Provider.Model.VoiceId
Was this page helpful?