Application Variables

The read-only application.lastresult$ variable is an array of elements containing information about the last recognition to occur within an application. Each array element represents a possible recognition result.

Recognition results are sorted by the confidence score of the recognition, from highest to lowest. Using application.lastresult.$ without an index is the same as referencing the first element of the array, application.lastresult$[0].

The following table describes the subobjects available for each possible recognition result:

Name

Description

application.lastresult$[i].bargeintime

Duration that elapsed until the user gave input.

application.lastresult$[i].confidence

Whole utterance confidence level for this interpretation. Valid values range from 0.0 (minimum) through 1.0 (maximum).

application.lastresult$[i].inputmode

Indicates whether the user used voice or DTMF to input this result.

application.lastresult$[i].interpretation

Semantic interpretation of the user's input.

application.lastresult$[i].markname

Name of the last <mark> executed before the user gave input, or before the end of playback occurred.

application.lastresult$[i].marktime

Number of milliseconds between when the last <mark> was executed and the user gave input, or the end of playback occurred.

application.lastresult$[i].recording

Reference to the user's utterance, if the recordutterance property is set.

application.lastresult$[i].recordingduration

Duration of the recording of the user's utterance, in ms.

application.lastresult$[i].recordingsize

Size of the recording of the user's utterance in bytes.

application.lastresult$[i].utterance

Raw string of words recognized for this interpretation. For a DTMF grammar, this variable contains the string representation of the matched digits.

Application variables are referenced in the same scope as any recognition that occurred during a call session.

<field>
    
<prompt>Say yes or no</prompt>
    <filled>
        
<if cond="application.lastresult$.confidence &lt; 0.5">
            <goto nextitem="confirm"/>
        
<else>
            <goto next="next_menu.html"/>
        
</if>
    
</filled>
</field>