Share via


Note

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

SrgsGrammarCompiler.Compile Method (SrgsDocument, Stream)

Compiles an SrgsDocument into a binary grammar file with the .cfg extension and sends the output to a stream.

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

Syntax

'Declaration
Public Shared Sub Compile ( _
    srgsGrammar As SrgsDocument, _
    outputStream As Stream _
)
'Usage
Dim srgsGrammar As SrgsDocument
Dim outputStream As Stream

SrgsGrammarCompiler.Compile(srgsGrammar, outputStream)
public static void Compile(
    SrgsDocument srgsGrammar,
    Stream outputStream
)

Parameters

  • outputStream
    Type: System.IO.Stream
    The stream that receives the results of compilation.

Exceptions

Exception Condition
ArgumentNullException

srgsGrammar is a null reference (Nothing in Visual Basic).

outputStream is a null reference (Nothing in Visual Basic).

Remarks

For more information, see Compile SRGS Grammars (Microsoft.Speech).

See Also

Reference

SrgsGrammarCompiler Class

SrgsGrammarCompiler Members

Compile Overload

Microsoft.Speech.Recognition.SrgsGrammar Namespace