Compile Method (SrgsDocument, Stream)

Microsoft Speech Platform SDK 11

Collapse image Expand Image Copy image CopyHover image

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

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

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

Parameters

srgsGrammar
Type: Microsoft.Speech.Recognition.SrgsGrammar..::..SrgsDocument

The grammar to compile.

outputStream
Type: System.IO..::..Stream

The stream that receives the results of compilation.

Exceptions

ExceptionCondition
ArgumentNullException

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

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

Remarks

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

See Also