Timers and timeouts
Nuance Recognizer offers various timers for limiting user silence and recognition time. The values for these timers can be optionally set in the DTMFRecognitionParameters or RecognitionParameters section of the DTMFRecognitionInit/RecognitionInit message, as well as RecognitionFlags and Control.
For more information about these timers, refer to the “Media Resource Control Protocol Version 2 (MRCPv2)” RFC document .
No-input timer
By default, the no-input timer starts when recognition starts and waits for audio to input form the user to begin. The default length Nuance Recognizer waits is 7000 miliseconds. If Nuance Recognizer doesn’t detect speech (for speech recogntion) or receive a DTMF digit (for DTMF recognition) within that time period, it terminates the recognition and returns a status response with code=404 message="No-Input Timeout (audio silence)"
.
Timer expires before user speaks
This scenario applies to both speech and DTMF recognition.
If the application initiates a recognition and plays a prompt to the user (to ask the user to say something), the recognition may timeout before the user has finished hearing the prompt. In this case, the audio from the user sent to Nuance Recognizer contains silence because the user waits for the prompt to finish before speaking.
The timeout follows this sequence:
-
Initiate recognition, set no-input timer to 3 seconds.
RecognitionRequest( recognition_init = RecognitionInit( parameters = RecognitionParameters( no_input_timeout_ms = 3000 ) ) )
-
Play prompt that is longer than 3 seconds to user.
-
Send audio from user.
RecognitionRequest(audio)
Nuance Recognizer does not detect speech within the first three silent seconds of audio received from the start of the recognition and the no-input timer expires. Nuance Recognizer terminates the recognition and returns a status response with 404 No-Input Timeout (audio silence).
To avoid this problem, use stall_timers and start_timers to start the no-input timer only after the prompt finishes:
-
Set no-input timer and stall timers:
RecognitionRequest( recognition_init = RecognitionInit( parameters = RecognitionParameters( no_input_timeout_ms = 3000, recognition_flags = RecognitionFlags(stall_timers=True) ) ) )
-
Play prompt to user.
-
Send audio from user (to allow the user to barge in on the prompt).
RecognitionRequest(audio)
-
When prompt has finished playing, start timers:
RecognitionRequest( control = Control( start_timers = StartTimersControl() ) )
-
Continue sending audio from user.
RecognitionRequest(audio)
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.