







![]() ![]() |
SrgsGrammarCompiler..::..Compile Method (XmlReader, Stream) |
SrgsGrammarCompiler Class See Also Send Feedback |
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
Visual Basic (Declaration) |
---|
Public Shared Sub Compile ( _ reader As XmlReader, _ outputStream As Stream _ ) |
Visual Basic (Usage) |
---|
Dim reader As XmlReader Dim outputStream As Stream SrgsGrammarCompiler.Compile(reader, outputStream) |
C# |
---|
public static void Compile( XmlReader reader, Stream outputStream ) |
Parameters
- reader
- Type: System.Xml..::..XmlReader
The XmlReader that reads data from the grammar. The grammar can reside in a physical file or in memory.
- outputStream
- Type: System.IO..::..Stream
The stream that will receive the results of compilation.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | reader is nullNothingnullptrunita null reference (Nothing in Visual Basic). outputStream is nullNothingnullptrunita 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).