Download presentation
Presentation is loading. Please wait.
Published byJuliana Foston Modified over 10 years ago
1
VoiceXML: Application and Session variables, N- best and Multiple Interpretations
2
Acknowledgements Prof. Mctear, Natural Language Processing, http://www.infj.ulst.ac.uk/nlp/index.html, University of Ulster. http://www.infj.ulst.ac.uk/nlp/index.html Bevocal Café Documentation
3
Overview More on variables Variable scope Session variables Application variables Using N-best Results Multiple Interpretations
4
More on variables: scope The scope of a variable defines when and where the variable exists and may be accessed. When the VoiceXML interpreter exits the scope where the variable was defined, the variable is destroyed. When the VoiceXML interpreter is in the scope of a variable, then that variable can be accessed by both VoiceXML and ECMAScript.
5
Variable ScopeWhere definedWhen initialised Where accessible When destroyed SessionBy the VoiceXML interpreter At beginning of session During session At end of session ApplicationIn the root document: child of When interpreter loads root document Throughout application When interpreter leaves root document DocumentIn a document: child of When interpreter loads document Within element When interpreter leaves document DialogWithin a form as child of or form item element When interpreter loads Within element When interpreter leaves AnonymousIn a or element When interpreter interprets Within element When interpreter leaves
6
Example of variable scope … var name = “student_id” expr = “123456” /> var name = “student_id” expr = “654321” /> var name = “new_student_id” expr = “document.student_id” /> … Document scopeDialog scope Reference to variable with document scope To reference a variable in enclosing scope use the scope’s logic scope name as prefix
7
Session variables Global, read-only, predefined variables that exist for the lifetime of the session session.connection.local.uri - URI for the local device. (also called DNIS - Dialled Number Information Service, provides the number of the called party.) session.connection.remote.uri - URI for the remote caller device. (also called ani - Automatic Number Identification, provides the number of the caller.) session.connection.protocol.name - name of the connection protocol session.connection.protocol.version - connection protocol version
8
Application variables Provide information about the text most recently recognized by the speech recognition engine The speech recognition engine returns a token (word or phrase) from the grammar that best matches the user’s utterance in the application.lastresult$ variable.
9
Attributes of application.lastresult$ The variable application.lastresult$ has four attributes: utterance - The word from the grammar that the speech recognition engine determines is the best match for the user’s utterance confidence - The speech recognition engine’s estimate of the accuracy for the utterance word. The value ranges from 0.0 to 1.0, with 0.0 for least confidence and 1.0 for most confidence. interpretation - The ECMAScript variable derived by the semantic interpretation script that will replace the utterance word. If the field has no semantic interpretation script, then the utterance word is copied to the interpretation word. inputmode - Whether the user entered the information using DTMF or voice
10
Example Confidence for user’s last utterance is less than 0.6 Save the value and branch to a control that validates the utterance Verify the user’s last utterance based on what the system recognised Take appropriate action
11
Using list of n-best tokens Set recogniser to return best 2 matches e.g. Result is returned in an array, lastresult$, in which the matched token with the highest confidence is in position 0 and the matched token with the second highest confidence match is in position 1. lastresult$ may contain up to maxnbest elements; in most cases, fewer results are returned. Can be used in cases where words are easily confused e.g. Boston / Austin and user is asked to verify which of the returned words is correct The application.lastresult$ array contains at least one element, namely, application.lastresult$[0]. You can check application.lastresult$.length to see how many elements are in the array.
12
Example using n-best recognition scores Cities [... (austin ?texas) { } (austin ?california) { } (boston ?massachusettes) { }... ]
14
I am not sure what you said. If you said press 1. If you said press 2. you said you said N-best example continued
15
Alternatively:
16
Multiple Interpretations In some applications, a single recognized utterance may have multiple interpretations, indicating that the utterance is ambiguous. Cities [... (portland ?maine) { } (portland ?oregon) { }... ] Multiple interpretations lets an application access the different interpretations for a given recognized utterance. If multiple grammar rules match the recognized utterance, all resulting interpretations are returned. You enable multiple interpretations by setting the bevocal.maxinterpretations property to a value other than one. bevocal.maxinterpretations
17
Combining the features Cities [... (austin ?texas) { } (austin ?california) { } (boston ?massachusettes) { }... ] Enable both Nbest and multiple interpretation features Application:Which office would you like to visit? User:(Garbled) ahstin. Application:Please say 1 if you mean Boston Massachusetts; 2 if you mean Austin Texas; 3 if you mean Austin California. If you want to start over, answer 0. User:Two. Application:Scheduling a visit with the Austin Texas office.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.