Using Alternate Return Values

You may want to have a grammar file return a value other than the exact phrase that the user says. This may be useful when you want to use phrases rather than words, or if you want different phrases to return the same result. Using phrases rather than single-syllable words improves recognition. An example of using an alternate return value could be that when the user says, "repeat prompts," the Speakeasy engine can act like it hears "repeat".

You can also use more than one word or phrase to return the same result. This may be especially helpful in a multilingual environment. For example, you could have an English grammar file that listens for "yes" and a Dutch grammar file that listens for "ja," but either grammar would return the result "yes." Then the script or reformatted screen would only have to be programmed for one result.

To use an alternate return value, list the word or phrase the engine should listen for and then {@ = "result";} where result is the alternate return value.

The following example is the grammar file sapDeliveryEntryCmdAndCtrl.bnf viewed in Notepad.

In this example, if the user said "go back," Speakeasy would return the text "back". However, if the user said "back," it would not match the terms the engine is listening for. Add a separate entry for "back" if you want the engine to listen for it, too.

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

© 2015 Wavelink Corporation. All Rights Reserved.