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
-
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
-
Thank you shelbyz, that solved my issue.
Even if I don't need to populate the further twiml, I can use this webhook as a side effect and just put a Pause verb in it.
Categories
- 83 All Categories
- 19 SIGNAL 2021
- 376 Product Discussions
- 7 Community - Announcements
- 2 Changelog
- 4 Forum UI Updates
- 8 Welcome Guide
- 6 Community - Events
- 2 Twilio Relay Developer Conference 2021 Mega Thread
- 1 External Community Events
- 25 Inspiration
- 17 Community - Other Discussions
- 1 Community- Twilio Startups
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