| |
Tutorial 21
Working with the Alpha-digit recognizer
Instructions
Drag and arrange states onto the canvas so that you have the following setup:

The user will respond with a catalog product code. Since the speaking the code will likely require short
pauses in speech, we must increase the "Training edge silence" setting for the Alpha-digit object to prevent
cutting-off the speaker. Do this by opening the configuration dialogue for "item_id", and raising the
"Misc" tab. Enable custom audio parameters by clicking the "Audio Parameters" check box. Increase the
trailing edge silence setting to 1000ms. Note that this only effects the Alpha-digit object. Adjusting
this setting in the global "Preferences" menu would effect the entire application.
 |
Enter the prompt "What Item do you want to order?"
Open the recognition port of the state, select the "Vocabulary" check box and enter the following
vocabulary:
ID570
ID571
ID572
ID573
|
 |
Enter the following Tcl code in the "recog_anything" state's "On Exit" tab:
regsub -all {(.)} $item_id(recog) {\1 } spell_list
|
 |
To the left output port, add the following expression: $item_id(recog) != ""
The dialog will branch left if the Alpha-digit recognition is not empty.
$item_id(recog) is the array that contains the list of words recognized by the Alpha-digit object.
!= means "not equal to".
|
 |
To the right output port, add the following expression: 1
This ensures the right port will always evaluate to true. Thus if the left port is false, the dialog
will branch right.
|
 |
Enter the prompt "You ordered Item number $spell_list would you like another item?"
The vocabulary for the left port is "Yes", and "No" for the right port.
|
 |
Enter the prompt "I didn't get that"
This state is reached when the Alpha-digit object does not recognize anything.
|
Now run the application to see the Alpha-digit object in action.
|