How to know when text-to-speech has finished speaking a text?

I could be wrong, but I'm pretty sure I've seen a webhook or maybe a callback in the Twilio library that notifies the end of a "Say" verb.

I do an update to the current call:

client.calls(call_sid).update(twiml="<Response><Say>Hello there</Say></Response>")

I would need to be notified when the user has finished hearing the phrase

Best Answer

  • shelbyz
    shelbyz ✭✭✭
    Answer ✓

    To handle what happens after TwiML executes you can add a <redirect> which can point to a URL where further TwiML instructions/processing can occur.

    Example
    client.calls(call_sid).update(twiml="<Response><Say>Hello there</Say><Redirect method="POST">http://pigeons.com/twiml.xml</Redirect></Response>")

Answers

If this is an emergency, please contact Twilio Support. This is not an official Support channel. https://support.twilio.com/
Have an urgent question?
Please contact Twilio Support. This is not an official Support channel.
Contact Support