The VoiceXML Handbook: Understanding and Building the Phone-Enabled Web


TABLE OF CONTENTS 
For each dialog item such as a field tag, the browser creates an ECMAScript variable called the shadow variable. The browser sets properties of the shadow variable to provide information about the interpretation of the item which is not available through other means. The shadow variable name is constructed from the item name with a dollar character "$" appended.
For example, a field named color will create a shadow variable named color$ with properties color$.confidence, color$.utterance and color$.inputmode.
The confidence property contains the confidence level of the match represented as a number between 0.0 (no confidence at all) to 1.0 (certainty). The utterance property contains the raw string of words matched by the recognizer. The exact format of the string will be browser-dependent. The inputmode property is set to "dtmf" to indicate that input was obtained by touch-tones, or "voice" or "speech" to indicate that input was obtained from voice recognition. The two values "speech" and "voice" are synonyms, but will be set to match the value specified by the inputmode attribute, for example with
The following example forces a nomatch event to be thrown if the confidence level is less than 0.75, overriding the built-in default of 0.5. Note that the ECMAScript operator "<" for less-than must be escaped as "<". Note also that changing the confidence level would be better...
UNLIMITED
FREE
ACCESS
TO THE
WORLD'S
BEST IDEAS
SIGN UP TO SEE MORE
An error occurred while processing the form. Please try again in a few minutes.
An error occurred while processing the form. Please try again in a few minutes.