Call Commands
Speak text
Changed onConvert text to speech and play it back on the call. If multiple speak text commands are issued consecutively, the audio files will be placed in a queue awaiting playback.
Expected Webhooks:
- call.speak.started
- call.speak.ended
post/calls/{call_control_id}/actions/speak
Request
- Base URLhttps://api.telnyx.com/v2
- AuthHTTP bearer
Path parameters
call_control_idstring required
Unique identifier and token for controlling the call
Request body
Example request
{
"payload": "Say this on the call",
"payload_type": "text",
"service_level": "basic",
"stop": "current",
"voice": "female",
"language": "arb",
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
"command_id": "891510ac-f3e4-11e8-af5b-de00688a4901"
}Response
Successful response upon making a call control command.
Example response
{
"data": {
"result": "ok"
}
}Changes
- breaking
removed from the
request propertyoneOflist - info
removed
assemblyaidiscriminator mapping keys from therequest property
- breaking
- info
added
assemblyaidiscriminator mapping keys to therequest property - info
added to the
request propertyoneOflist
- info