GrammarBuilder Constructor

GrammarBuilder Constructor

 

Initializes a new instance of the GrammarBuilder class.

Namespace:   System.Speech.Recognition
Assembly:  System.Speech (in System.Speech.dll)

NameDescription
System_CAPS_pubmethodGrammarBuilder()

Initializes a new, empty instance of the GrammarBuilder class.

System_CAPS_pubmethodGrammarBuilder(Choices)

Initializes a new instance of the GrammarBuilder class from a set of alternatives.

System_CAPS_pubmethodGrammarBuilder(GrammarBuilder, Int32, Int32)

Initializes a new instance of the GrammarBuilder class from a repeated element.

System_CAPS_pubmethodGrammarBuilder(SemanticResultKey)

Initializes a new instance of the GrammarBuilder class from a semantic key.

System_CAPS_pubmethodGrammarBuilder(SemanticResultValue)

Initializes a new instance of the GrammarBuilder class from a semantic value.

System_CAPS_pubmethodGrammarBuilder(String)

Initializes a new instance of the GrammarBuilder class from a sequence of words.

System_CAPS_pubmethodGrammarBuilder(String, Int32, Int32)

Initializes a new instance of the GrammarBuilder class from the sequence of words in a String and specifies how many times the String can be repeated.

System_CAPS_pubmethodGrammarBuilder(String, SubsetMatchingMode)

Initializes a new instance of the GrammarBuilder class for a subset of a sequence of words.

Instances of this class can also be obtained by implicit conversions from other classes or by combining a GrammarBuilder object with a second object to from a new GrammarBuilder. For more information, see the Implicit and Addition methods.

To add constraints to an existing GrammarBuilder, use the Add, Append, AppendDictation, AppendRuleReference, and AppendWildcard methods, and the Addition operator.

System_CAPS_importantImportant

The speech recognizer can throw an exception when using a speech recognition grammar that contains duplicate semantic elements with the same key name or multiple semantic elements that could repeatedly modify the value of the same semantic element. For more information about building a speech recognition grammar that contains semantic information, see 0fea1236-5261-4608-89b3-9ce9ffc22a1c.

For more information about building and using speech recognition grammars, see 6a7dc524-07fc-4862-8d48-8c10dc64b919 and 7e2cc577-cb05-4318-9da3-7c8675d3d9ae.

Return to top
Show:
© 2016 Microsoft