Enabling Voice Training for New Terms

When you add words or phrases to a grammar file, you can specify if they should be available for voice training. The !slot command in a grammar file specifies which words and phrases should be available for voice training.

While you are adding terms to a grammar file, you separate the words you want to have available for user training from those you want to exclude from user training. Decide which terms you want to use for voice training, then separate them by creating a rule for each group. Then specify that both of the new rules belong to the main rule, Speech.

In the example below, the highlighted line shows that the rules YesNo and Cancel are included in the main rule, Speech. Then each term in the rules is defined on the last two lines.

!grammar YesNoCancel;
!start <Speech>;
!slot <YesNo>;

<Speech>: <YesNo> | <Cancel>;

<YesNo>: yes | no;

<Cancel>: cancel;

Notice that the !start command specifies the main rule, Speech. Since Speech includes YesNo and Cancel, this grammar file means the engine will listen for all the terms in both those rules ("Yes," "no," and "cancel").

After the terms have been grouped, use the !slot command on the line following the !start command (the third line in the example above). When you use the !slot command, specify the rule that you want to use for training. The example above will enable voice training for the terms in the rule YesNo.

The !slot command only works for rules that contain simple terms such as words, phrases, and alternate terms. It doesn't work for rules that contain other rules (such as Speech in the above example) or complex commands. You cannot use the !slot command for groups that contain !repeat or #.

Once you have put the terms in a rule and used the !slot command to specify the rule, use the Grammar File Manager to select the terms for training before the package is deployed to the device. See Specifying Voice Profile Training Options for information on selecting terms for user training.

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal