GrammarBuilder.Append Method

 

Appends a grammar element to the current sequence of grammar elements.

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

NameDescription
System_CAPS_pubmethodAppend(Choices)

Appends a set of alternatives to the current sequence of grammar elements.

System_CAPS_pubmethodAppend(GrammarBuilder)

Appends a grammar element to the current sequence of grammar elements.

System_CAPS_pubmethodAppend(GrammarBuilder, Int32, Int32)

Appends a repeated grammar element to the current sequence of grammar elements.

System_CAPS_pubmethodAppend(SemanticResultKey)

Appends a semantic key to the current sequence of grammar elements.

System_CAPS_pubmethodAppend(SemanticResultValue)

Appends a semantic value to the current sequence of grammar elements.

System_CAPS_pubmethodAppend(String)

Appends a phrase to the current sequence of grammar elements.

System_CAPS_pubmethodAppend(String, Int32, Int32)

Appends a repeated phrase to the current sequence of grammar elements.

System_CAPS_pubmethodAppend(String, SubsetMatchingMode)

Appends an element for a subset of a phrase to the current sequence of grammar elements.

Use these methods to append grammar elements to an existing GrammarBuilder. As you create grammar elements, you can append them to the existing builder to progressively develop the constraints for a speech recognition grammar. Each element is added to the end of the current sequence of elements.

This method has overloads for appending GrammarBuilder, String, Choices, SemanticResultKey, and SemanticResultValue objects.

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 Using SemanticResultKey and SemanticResultValue Objects.

For more information about building and using speech recognition grammars, see Speech Recognition and Creating GrammarBuilder Grammars.

Return to top
Show: