| How to determine the utterance that triggered a Hotlink element |
| Categories: Audium Studio (3.4.x) |
| Article ID: | 34 |
| Last updated: | January 12, 2007 |
| User Opinions |
|
No users have voted.
|
|
Thank you for rating this answer.
|
SUMMARY
Is it possible to use one Hotlink element with an extensive grammar, and then determine which utterance trigger the Hotlink element to determine what should happen?
SYMPTOMS
Developer would like to encapsulate several different utterances into a Hotlink element, and then determine which of those utterances was used to activate the Hotlink element.
RESOLUTION
The recommended approach is to have one Hotlink element for each type of utterance you would like to capture (e.g. "help", "home", etc.). Then, although the Hotlink elements may listen for several utterances (e.g. "help", "help me", "I need help"), you can determine which action the user desired by which Hotlink element was visited.
However, if you create a custom voice element, you can include your own <link> VoiceXML elements in it using the VLink class from the Audium Voice Foundation Classes (VFCs). If you do this, you can store the value of the shadow variable named application.lastresult$.utterance (which is available immediately after the recognition takes place) in a standard variable in the body of the link, submit this new variable back to the voice element, and then store it in element data for retrieval elsewhere in your application. Note that when the submit from the link is received by your custom element, you should exit to wherever the link should have exited to (i.e. the voice element itself will have an exit state that is triggered by the "hidden" link that it encapsulates).
For more information about the <link> VoiceXML element, please refer to section 2.5 of the VoiceXML 2.0 Specification, and for more information about the application.lastresult$.utterance shadow variable, please refer to section 5.1.5.
|
| Visitor Comments |
|
No visitor comments posted. Post a comment
|
| Attachments |
|
No attachments were found.
|