Export (0) Print
Expand All

GrammarBuilder.Append Method

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

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
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) Appends a phrase 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(GrammarBuilder, Int32, Int32) Appends a repeated grammar element to the current sequence of grammar elements.
Public method Append(String, Int32, Int32) Appends a repeated phrase to the current sequence of grammar elements.
Top

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

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

Show:
© 2014 Microsoft