Print

Speech recognition results and VoiceXML applications

VoiceXML provides shadow variables accessible within a page to access recognition results such as application.lastresult$. While this includes a mechanism for presenting multiple possible semantic matches (n-best results whose presence can be determined by inspecting application.lastresult$.length), unfortunately the specification does not describe how to present a result that contains multiple interpretations for a given semantic match.

Avaya Experience Portal addresses the issue of a result containing multiple interpretations for a given semantic match by exposing the shadow variable application.lastresult$.interpretation$. To test for the presence of multiple interpretations in a result, examine application.lastresult$.interpretation$.length.

If the VoiceXML page containing that grammar uses the maxnbest property of 2, then the recognition results arising from a caller saying star gazer would be accessed as follows in the VoiceXML specification:

application.lastResult$.length             2
application.lastResult$[0].confidence      0.83
application.lastResult$[0].utterance       Stargazer
application.lastResult$[0].interpretation  eyes
application.lastResult$[1].confidence      0.12
application.lastResult$[1].utterance       starchaser
application.lastResult$[1].interpretation  legs

Even though the recognition results contain the additional interpretations look and run, the VoiceXML specification makes no provisions for making those additional interpretations available to the application. To accomplish this, Avaya Experience Portal extends this list of shadow variables as:

application.lastResult$[0].interpretation$.length   2
application.lastResult$[0].interpretation$[0]       eyes
application.lastResult$[0].interpretation$[1]       look
application.lastResult$[1].interpretation$.length   2
application.lastResult$[1].interpretation$[0]       legs
application.lastResult$[1].interpretation$[1]       run