Share via


Note

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

GrammarBuilder.Addition Operator (GrammarBuilder, GrammarBuilder)

Creates a new GrammarBuilder that contains a sequence of two GrammarBuilder objects.

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

Syntax

'Declaration
Public Shared Operator + ( _
    builder1 As GrammarBuilder, _
    builder2 As GrammarBuilder _
) As GrammarBuilder
'Usage
Dim builder1 As GrammarBuilder
Dim builder2 As GrammarBuilder
Dim returnValue As GrammarBuilder

returnValue = (builder1 + builder2)
public static GrammarBuilder operator +(
    GrammarBuilder builder1,
    GrammarBuilder builder2
)

Parameters

Return Value

Type: Microsoft.Speech.Recognition.GrammarBuilder
Returns a GrammarBuilder for the sequence of the builder1 parameter followed by the builder2 parameter.

Remarks

GrammarBuilder supports conversions from the following classes.

This method accepts the objects listed above for the builder1 and builder2 parameters. For more information, see the Implicit operators.

Important

When you combine 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

Addition Overload

Microsoft.Speech.Recognition Namespace

Add

Implicit