Note

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

SrgsGrammarCompiler.Compile Method (XmlReader, Stream)

Compiles data for an XML-format grammar file referenced by an XmlReader 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 ( _
    reader As XmlReader, _
    outputStream As Stream _
)
'Usage
Dim reader As XmlReader
Dim outputStream As Stream

SrgsGrammarCompiler.Compile(reader, outputStream)
public static void Compile(
    XmlReader reader,
    Stream outputStream
)

Parameters

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

Exceptions

Exception Condition
ArgumentNullException

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

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

Remarks

The XML-format grammar file referenced by the XmlReader must conform to the Speech Recognition Grammar Specification (SRGS) Version 1.0.

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

See Also

Reference

SrgsGrammarCompiler Class

SrgsGrammarCompiler Members

Compile Overload

Microsoft.Speech.Recognition.SrgsGrammar Namespace