Special Rules Support

Special Rules Support

The Speech Recognition Grammar Specification (SRGS) Version 1.0 defines special rules named NULL, VOID, and GARBAGE. SRGS also prescribes the behavior for speech engines when they encounter the special rules. These special rules are implemented in grammars by means of a rule reference, where the rule name becomes the value of the special attribute of a ruleref element. Here is a summary of the functionality that each of the special rules provides:

  • NULL. Defines a rule that is automatically matched in the absence of any audio input.

  • GARBAGE. Defines a rule that may match any speech up until the next rule match, the next token, or until the end of spoken input.

  • VOID. Defines a rule whose contents will not be recognized. Inserting a ruleref element with its special attribute set to VOID into a rule means that the speech recognition engine will not recognize the contents of the rule.

The Microsoft Grammar Development Tools provide support for special rule references used both within other rules and when used as stand-alone rules. The following table summarizes the behavior of each of the Grammar Development Tools with respect to special rule references.

Tool

NULL

GARBAGE

VOID

GrammarValidator

Validates for correct syntax.

Validates for correct syntax.

Validates for correct syntax.

PhraseGenerator

Outputs an empty string.

Emits “…” (three periods) in place of any words that were recognized. Emits two phrases when GARBAGE is used within a rule that contains other content.

If used in rules containing words or phrases, does not emit a phrase.

CheckPhrase

Emits a warning that the (empty) phrase is being skipped.

Emulates and matches the GARBAGE rule.

Not included in output.

Confusabilty

Emits a warning that the (empty) phrase is being skipped.

Emulates and matches the GARBAGE rule.

Not included in output.

Simulator

Emits a warning that the (empty) phrase is being skipped.

Emulates and matches the GARBAGE rule.

Not included in output.

Simulator ResultsAnalyzer

Emits a warning that the (empty) phrase is being skipped.

Preserves “…” in the RecoResultText.

Not included in output.

GrammarCompiler

Preserves behavior in compiled file.

Preserves behavior in compiled file.

Preserves behavior in compiled file.

PrepareGrammar

Preserves behavior in compiled file.

Preserves behavior in compiled file.

Preserves behavior in compiled file.

Show:
© 2016 Microsoft