Прочетете на английски Редактиране

Споделяне чрез


SrgsGrammarCompiler Class

Definition

Compiles SrgsDocument and XML-format grammar files into binary grammar files with the .cfg extension and sends the output to a stream.

C#
public static class SrgsGrammarCompiler
Inheritance
SrgsGrammarCompiler

Remarks

You compile SrgsDocument objects and XML-format grammars to a binary format to optimize them for loading and consumption by a speech recognition engine. Compiling a speech recognition grammar using one of the Compile methods can reduce the amount of time required to construct a Grammar object from an SrgsDocument or an XML-format grammar.

For more information, see Compile SRGS Grammars.

Methods

Compile(SrgsDocument, Stream)

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

Compile(String, Stream)

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

Compile(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.

CompileClassLibrary(SrgsDocument, String, String[], String)

Compiles an SRGS document into a DLL.

CompileClassLibrary(String[], String, String[], String)

Compiles multiple SRGS grammars into a DLL.

CompileClassLibrary(XmlReader, String, String[], String)

Compiles an SRGS grammar into a DLL.

Applies to

Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)