SrgsDocument Class

Defines a design-time object that is used to build strongly typed runtime grammars that conform to the Speech Recognition Grammar Specification (SRGS) Version 1.0.

System.Object
  Microsoft.Speech.Recognition.SrgsGrammar.SrgsDocument

Namespace:  Microsoft.Speech.Recognition.SrgsGrammar
Assembly:  Microsoft.Speech (in Microsoft.Speech.dll)

[SerializableAttribute]
public sealed class SrgsDocument

You can you construct an empty SrgsDocument instance and build a grammar by adding instances of classes that represent SRGS elements, such as SrgsRule, SrgsOneOf,SrgsItem, SrgsRuleRef, SrgsSemanticInterpretationTag, and SrgsToken. You can also construct an SrgsDocument instance from an existing SRGS-compliant XML grammar file, from an instance of SrgsRule, or from an instance of GrammarBuilder.

After the SrgsDocument object is created, it can be loaded into a Grammar object or compiled by SrgsGrammarCompiler, enabling it to be read by a Grammar object.

See Create Grammars Using SrgsGrammar (Microsoft.Speech) for more information and examples.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: