Partager via


Note

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

Grammar Constructor (GrammarInfo)

Creates a new instance of the Grammar class from a GrammarInfo instance.

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

Syntax

'Declaration
Public Sub New ( _
    grammarInfo As GrammarInfo _
)
'Usage
Dim grammarInfo As GrammarInfo

Dim instance As New Grammar(grammarInfo)
public Grammar(
    GrammarInfo grammarInfo
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

Thrown when grammarInfo is a null reference (Nothing in Visual Basic).

ArgumentNullException

Thrown when the grammar referred to by grammarInfo does not have a root rule.

See Also

Reference

Grammar Class

Grammar Members

Grammar Overload

Microsoft.Speech.Recognition Namespace