SrgsDocument Class

Microsoft Speech Platform SDK 11

Collapse image Expand Image Copy image CopyHover image

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.

Inheritance Hierarchy

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

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

Syntax

Visual Basic (Declaration)
<SerializableAttribute> _
Public NotInheritable Class SrgsDocument
Visual Basic (Usage)
Dim instance As SrgsDocument
C#
[SerializableAttribute]
public sealed class SrgsDocument

Remarks

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.

Thread Safety

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

See Also