Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

GrammarBuilder.Add Method (Choices, GrammarBuilder)

Creates a new GrammarBuilder that contains a Choices object followed by a GrammarBuilder object.

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

Syntax

'Declaration
Public Shared Function Add ( _
    choices As Choices, _
    builder As GrammarBuilder _
) As GrammarBuilder
'Usage
Dim choices As Choices
Dim builder As GrammarBuilder
Dim returnValue As GrammarBuilder

returnValue = GrammarBuilder.Add(choices, builder)
public static GrammarBuilder Add(
    Choices choices,
    GrammarBuilder builder
)

Parameters

Return Value

Type: Microsoft.Speech.Recognition.GrammarBuilder
A GrammarBuilder for the sequence of the choices element followed by the builder element.

Remarks

GrammarBuilder supports implicit conversions from the following classes:

This method accepts the objects listed above for the builder parameter.

For more information, see the Implicit and Addition operators.

Important

When you combine Choices or GrammarBuilder objects that contain SemanticResultValue or SemanticResultKey instances, make sure you avoid creating duplicate semantic elements with the same key name or multiple semantic elements that could repeatedly modify the Value property of a SemanticValue object. The speech recognizer can throw an exception if it encounters these circumstances. For more information about building a speech recognition grammar that contains semantic information, see Add Semantics to a GrammarBuilder Grammar (Microsoft.Speech).

See Also

Reference

GrammarBuilder Class

GrammarBuilder Members

Add Overload

Microsoft.Speech.Recognition Namespace

Append

Implicit

Addition