completetimeout

Specifies how long to wait before concluding that a caller is finished speaking.

Value

Integer: 0–INT_MAX (milliseconds)

Default

0 (timer disabled)

How to set

Shown in precedence order (see Rules of parameter precedence):

In a VoiceXML application, using a <property> element.

In the browser, using the Speech-Complete-Timeout header in a RECOGNIZE method.

In a parameter grammar.

Usage

Frequently used by application developers to tune individual collections.

Useful for simple, closed grammars such as a list of names.

Applicable for Nuance Recognizer. Not applicable for Dragon Voice recognition.

When set via VoiceXML or MRCP, a single value is applied to all active grammars.

The timer starts when Recognizer has a well-formed hypothesis, and restarts if Recognizer reaches a new hypothesis.

If more than one grammar is active, each grammar can have its own value of completetimeout (as set via the <meta> tag). This parameter allows Recognizer to conclude its search and return a result when a well-formed hypothesis is found. The phrase “well-formed” means a valid phrase that the grammar allows as a recognition result. However, the determination for a well-formed hypothesis is made before ECMAScript and constraint list processing (both of which might invalidate the hypothesis before Recognizer returns a result).

This parameter provides a way to fine-tune latency by returning results as quickly as possible. Use completetimeout to reduce the wait for end-of-speech once a valid recognition has occurred. You can set completetimeout smaller than incompletetimeout since completetimeout only fires when Recognizer has a well-formed hypothesis. For example, consider a grammar for a 7-digit telephone number. Do not use builtin:grammar/digits;length=7 since the length constraint is applied using a constraint list. Instead, write the grammar as:

<item repeat="7">
  <ruleref uri="#digits"/>
</item>

In this example, incompletetimeout needs to be large since people often pause between the first three digits and the last four. However, completetimeout waits for a full 7-digit hypothesis before starting the timer. Therefore, it can be made shorter.

For Recognizer, the smaller of the two values (completetimeout or incompletetimeout) triggers the timeout when a complete utterance is spoken.

The timer starts during silence when Recognizer formulates its first well-formed hypothesis. Recognizer continues processing for the time specified by completetimeout. Usual values are 500–1500 milliseconds (from .5 to 1.5 seconds). During this time, if a new hypothesis is reached, the timer restarts.

This parameter is best used with simple, closed grammars such as a list of names. Below, here is an example that is not appropriate for completetimeout (compare this grammar to the previous):

<item repeat="1-7">
  <ruleref uri="#digits"/>
</item>

Above, because the repeat attribute allows a range, the completetimeout would be dangerous since the timer will potentially start after acquiring even a single digit. (It will undoubtedly start and maybe even fire during a pause after three digits.

Use this parameter cautiously. Shorter settings result in faster response times, but risk interrupting callers before they are done speaking. Because the timer starts when Recognizer has a valid hypothesis, you should tune the parameter for each of the active grammars: if the value is too small, the timer could inadvertently truncate the user’s intended utterance. For example, the timer could start after recognizing “I want to go to Boston,” but the intended utterance might have been “I want to go to Boston [pause] on October 15 in the evening.”

Unlike incompletetimeout which must be consistent across all grammars in a context, you can set completetimeout on a per-grammar basis. Examples of grammars that would require extra-careful tuning include date grammars, unconstrained-digit grammars, and advanced natural language grammars.

Recommendations for setting this parameter:

  • Avoid settings that are too low. Otherwise, Recognizer might return a result that would have been replaced with a better hypothesis if more time were allowed.
  • Avoid setting this parameter on grammars that contain loops. For example, the built-in alphanum_lc and digits grammars. These grammars allow ranges of length, and Recognizer could reach a valid hypothesis when a user pauses between characters.
  • Use conservative settings (larger values) when setting this parameter on grammars that contain ECMAScript or a constraint list. Otherwise, this processing might reject the well-formed hypothesis (resulting in a nomatch condition).
  • To be useful, completetimeout must expire before incompletetimeout. This is because incompletetimeout measures any silence (without regard to recognition hypotheses). When a pause occurs, completetimeout must expire first because it ensures that recognition has occurred. Then, as a secondary timer, incompletetimeout can expire.

A typical application sets this parameter via a VoiceXML property. Note the difference in the value format (the voice browser would convert this to "800"):

<property name="completetimeout" value="800ms"/> 

This property generates the following MRCP header:

Speech-Complete-Timeout: 800

Sample definition in a grammar file:

<meta name="completetimeout" content="800"/>

Related parameter