I'm using TwilioML to collect user's input.
What I'm seeing is a significant delay 4-6 sec. from the time the user stop speaking to the time my service ( endpoint) is called. This happens even with very simple sentences (ex. my name is john).
Is this a known issue? From a user experience point of view it is not a great experience.
I tried to add a 'filler' via but it does not have any effect because the earlier I can get it started is when the endpoint is called.
Maybe there is a way to play a file in parallel while the the audio is converted to text.
From the documentation:
The 'timeout' attribute sets the limit in seconds that Twilio will
wait for the caller to press another digit or say another word before
moving on and making a request to the 'action' URL. For example, if
'timeout' is '3', Twilio will wait three seconds for the caller to
press another key or say another word before submitting the previously
entered digits or speech to the 'action' URL. Twilio waits until
completing the execution of all nested verbs before beginning the
timeout period.
The fact you are seeing a delay of between 4 and 6 seconds is probably explained by the fact the default timeout setting is 5 seconds.
Have you tried using a partialResultCallback URL? If set Twilio will submit results of speech recognition in real time to this URL. It's also worth adding hints if you are expecting callers to say certain words as this can speed up the recognition.
Related
Is it possible to do a GET call for the transcription of an incoming call while it is in progress with Twilio?
I have been able to get it to run the call, but the transcription text initially shows up as Null. When I end the call, I can get the transcription. Does more time need to pass in order to be able to pull the text? Or does the call need to end first?
I am trying to build a portion of an IVR tree that will check the transcription time, and see if it contains certain text before moving to the next task.
Thanks
So I did some more testing and set the message after the record widget to continuously repeat for about 30 seconds and I ran continuous commands to the transcriptions page for the call. After about 10 seconds, the transcription populated.
I can't seem to find any documentation on this, but I'd like to say "one moment" in a Gather block in between when a user stops speaking and when the speech recognition processor delivers the words they said (since anecdotally this can take a few seconds and result in dead air in the meantime).
I can't seem to find anything like that in the documentation. All of the examples are for things like:
<Response>
<Gather>
<Say>Voice prompt to read to the user before collection</Say>
<Say>Say more things if you want</Say>
</Gather>
<Say>Something to say if the user doesn't provide feedback</Say>
</Response>
Having around 5 seconds of dead air isn't the worst thing ever, but it lacks polish.
Twilio developer evangelist here.
There is nothing to provide for a message after the user finishes speaking to the <Gather> and after the speech result is ready and sent to the action URL, however I think you might be characterising the delay wrong.
Twilio streams the voice to the speech detection service, so we get real time results (you can get partial results by setting a partialResultCallback URL). Instead, the time that elapses between the end of the caller speaking and the action being called is based on the timeout which is 5 seconds by default.
What I would suggest is that you try different values for the speechTimout attribute including auto, which "will stop speech recognition when there is a pause in speech and return the results immediately."
Let me know if that helps at all.
My Twilio application dials our conference line, waits two seconds and then sends the conference PIN, followed by #.
$dial->number('442031234567', ['sendDigits' => 'wwww123456789'] );
I would like to be able to give my users an estimate of how long they should expect silence (while Twilio is sending the PIN digits) before the call is ready. I can make the call multiple times and time the delay, but that seems less exact that finding the underlying timings!
I know that each w character takes 0.5s, but I can't find any documentation for the amount of time each digit takes after that wait.
I've looked at Twilio's docs for sendDigits and also play
Twilio developer evangelist here.
I don't believe we give any guidance on how long the DTMF tones will take, but I believe they are a constant time. I would recommend trying it a few times, along with the system that you are dialling in to in order to estimate the time for your users.
I have an application that is not allowed to call people after 8 PM (TCPA). I push calls in batch. Twilio makes 1 call per second roughly. I want to prevent twilio from accidentally pushing calls after 8 PM local time to the area code called.
What is the approach to do this?
Twilio developer evangelist here.
I'm afraid Twilio doesn't have anything "out of the box" that can help you there. Twilio will continue to make all the calls that you have pushed to it.
You could keep a record of all the calls that you have pushed, you receive the call SID in the response to creating a call, and then as it comes close to your cutoff time for those calls, send requests to cancel them.
Alternatively, rather than sending the calls to Twilio in large batches, why not use smaller batches that you can more easily estimate the time they will take to be sent and then stop sending calls for those areas at the right time. For example, if you sent calls in batches of 60, you can be reasonably sure they will take 60 seconds for all of them to be made. You can then stop sending calls at 7:59pm.
I have a number set up with a small twiml script (using twimlets). I want to have it stop responding for a bit if it's overused. For example if it's dialed 5 times in 1 minute it should wait 3 minutes before responding again. Is this possible with twiml/twimlets or would I need to move it to my own server and set up some code to detect this?
Twilio developer evangelist here.
Unfortunately I you't be able to set a rate limit just with TwiML. You could set a time limit for each call, but that wouldn't really accomplish exactly what you want.
My suggestion would be moving it to your own server where you will then be able to have full control of what your pages return, therefore showing different content according to the number of times it's been requested.
You can probably just spin up a free Heroku instance that will make things easier for you. This page shows you how to do that and much more.