Clca
Clca

Reputation: 81

twilio gather significant delay in speech2text processing

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.

Upvotes: 0

Views: 810

Answers (1)

miknik
miknik

Reputation: 5941

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.

Upvotes: 1

Related Questions