Append Method

Microsoft Speech Platform SDK 11

Collapse image Expand Image Copy image CopyHover image

Appends recognition grammar elements to the current GrammarBuilder.

Overload List

  Name Description
Public method Append(String) Appends a phrase to the current sequence of grammar elements.
Public method Append(Choices) Appends a set of alternatives to the current sequence of grammar elements.
Public method Append(GrammarBuilder) Appends a grammar element to the current sequence of grammar elements.
Public method Append(SemanticResultKey) Appends a semantic key to the current sequence of grammar elements.
Public method Append(SemanticResultValue) Appends a semantic value to the current sequence of grammar elements.
Public method Append(String, SubsetMatchingMode) Appends an element for a subset of a phrase to the current sequence of grammar elements.
Public method Append(String, Int32, Int32) Appends a repeated phrase to the current sequence of grammar elements.
Public method Append(GrammarBuilder, Int32, Int32) Appends a repeated grammar element to the current sequence of grammar elements.
Top

Remarks

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.

Important note Important

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 Add Semantics to a GrammarBuilder Grammar (Microsoft.Speech).

For more information about building and using speech recognition grammars, see Speech Recognition (Microsoft.Speech) and Create Grammars Using GrammarBuilder (Microsoft.Speech).

See Also