In addition to the rules you create, there are several reserved rules that dictate special behaviour for the Speech Engine. These rules are:
$GARBAGE
$VOID
$NULL
The $GARBAGE rule engages the out-of-vocabulary filter of the engine, allowing it to listen for arbitrary phonetic sequences until it hears the next matching word in the grammar. The garbage that was matched will not be returned by the Engine.
#ABNF 1.0;
language en-US;
mode voice;
root $yesorno;
$yes = yes [please];
$no = no $GARBAGE;
The above grammar could allow the user to say "no", "no thank you", or "no you stupid machine." All that would be returned would be the matched "no" rule; "thank you" or "you stupid machine" would not be returned as part of the answer.
Note that engaging the out-of-vocabulary filter can slow down recognition times, and even cause additional misrecognitions if used too aggressively.
We recommend creating specific "filler" models using grammar rules that match frequently occurring out-of-vocabulary words instead of using the $GARBAGE rule, if possible. For example, it is often better to use a rule like:
$no = no [thank] [you] [stupid] [machine];
Instead of the $GARBAGE rule, assuming your users are frequently giving responses like the ones mentioned above.
The $VOID rule invalidates any matched rule that contains it, and hence any answer that contains it.
#ABNF 1.0;
language en-US;
mode voice;
root $yesorno;
$yesorno = $yes | $no;
$yes = yes [please];
$no = no $VOID;
If the Engine recognizes the word "no" being spoken with the above grammar, it will invalidate the answer, and the Engine will return with no answer, as the $VOID rule was returned as part of the matched $no rule.
The $NULL rule is automatically matched as soon as it is seen. Users rarely need to use the $NULL rule, but it can be useful when creating grammars programmatically. The $NULL rule is illustrated below with standard grammar operations rewritten to use the $NULL rule.
$yes = yes [please];
/* Identical rule expansion using the $NULL rule */
$yes = $yes (please | $NULL);
$oh_boy = (oh boy)<0->;
/* Identical rule expansion using the $NULL rule */
$oh_boy = oh boy $oh_boy | $NULL;
Next Tags
Complete Help Topic List | Speech Engine Product Information