SUI_AddGroupCommand Table of Contents || Prev | Next || [?]

 
SUI_AddGroupCommand (groupNumber; phraseString; refcon)
 
ParameterTypeDescription
groupNumberIntegerGroup number to assign to the phrase (1-99)
phraseStringStringPhrase to listen for
refconLongintReference constant (ID) of the phrase
 
Description

SUI_AddGroupCommand adds a word or phrase to the language model in the specified group. Embedded language models are supported, which are delimited lists or references to string arrays. You can also make words optional by using paranthesis. Entire embedded models can be made optional by passing an empty value.

To allow more natural utterances, use an ellipses in your grammar text. This allows for more flexible grammars since extraneous speech will simply be ignored. On Windows, you can also specify embedded dictation by using an asterisk ("*") for a single word, or an asterisk plus for one or more words ("*+").

Example 1:

ARRAY STRING (80;aReport;3)
aReport{1}:="Sales Summary"
aReport{2}:="Sales Detail Report"
aReport{3}:="Backorder Summary"

SUI_AddGroupCommand (2;"(Please) print the <aReport>";100)

Later, you detect a refcon of 100, so you know to run your custom print method.

Example 2:

You can also define the contents of an embedded model by using the format <option one/option two/option three>:

SUI_AddGroupCommand (2;"Print in <landscape/portrait>";101)

This is more convenient than defining arrays when you don't need to.

Note: The embedded list can contain many items but must not exceed 255 characters.

Example 3:

SUI_AddGroupCommand (50;"... Print my report ...";51) `Allows extraneous speech.
SUI_AddGroupCommand (50;"The street is *+";52) `Embedded dictation (Windows only)