共用方式為


SrgsGrammarCompiler.Compile 方法

定義

SrgsDocument 物件與 XML 格式的文法檔案編譯成具有 .cfg 副檔名的二進位文法檔案,並將輸出傳送至資料流。

多載

Compile(SrgsDocument, Stream)

SrgsDocument 物件編譯成具有 .cfg 副檔名的二進位文法檔案,並將輸出傳送至資料流。

Compile(String, Stream)

將 XML 格式的文法檔案編譯成具有 .cfg 副檔名的二進位文法檔案,並將輸出傳送至資料流。

Compile(XmlReader, Stream)

XmlReader 所參考的 XML 格式的文法檔案的資料編譯成具有 .cfg 副檔名的二進位文法檔案,並將輸出傳送至資料流。

Compile(SrgsDocument, Stream)

來源:
SrgsGrammarCompiler.cs
來源:
SrgsGrammarCompiler.cs
來源:
SrgsGrammarCompiler.cs
來源:
SrgsGrammarCompiler.cs

SrgsDocument 物件編譯成具有 .cfg 副檔名的二進位文法檔案,並將輸出傳送至資料流。

public:
 static void Compile(System::Speech::Recognition::SrgsGrammar::SrgsDocument ^ srgsGrammar, System::IO::Stream ^ outputStream);
public static void Compile (System.Speech.Recognition.SrgsGrammar.SrgsDocument srgsGrammar, System.IO.Stream outputStream);
static member Compile : System.Speech.Recognition.SrgsGrammar.SrgsDocument * System.IO.Stream -> unit
Public Shared Sub Compile (srgsGrammar As SrgsDocument, outputStream As Stream)

參數

srgsGrammar
SrgsDocument

要編譯的文法。

outputStream
Stream

接收編譯結果的資料流。

例外狀況

srgsGrammarnull

outputStreamnull

備註

如需詳細資訊,請參閱 編譯 SRGS 文法

適用於

Compile(String, Stream)

來源:
SrgsGrammarCompiler.cs
來源:
SrgsGrammarCompiler.cs
來源:
SrgsGrammarCompiler.cs
來源:
SrgsGrammarCompiler.cs

將 XML 格式的文法檔案編譯成具有 .cfg 副檔名的二進位文法檔案,並將輸出傳送至資料流。

public:
 static void Compile(System::String ^ inputPath, System::IO::Stream ^ outputStream);
public static void Compile (string inputPath, System.IO.Stream outputStream);
static member Compile : string * System.IO.Stream -> unit
Public Shared Sub Compile (inputPath As String, outputStream As Stream)

參數

inputPath
String

要編譯的檔案路徑。

outputStream
Stream

接收編譯結果的資料流。

例外狀況

inputPathnull

outputStreamnull

inputPath 為空字串。

備註

XML 格式文法檔案必須符合 SRGS) 1.0 版 (語音辨識文法規格

存取檔案時,會在建立或開啟檔案時執行安全性檢查。 除非檔案已關閉並重新開啟,否則通常不會再次執行安全性檢查。

如需詳細資訊,請參閱 編譯 SRGS 文法

適用於

Compile(XmlReader, Stream)

來源:
SrgsGrammarCompiler.cs
來源:
SrgsGrammarCompiler.cs
來源:
SrgsGrammarCompiler.cs
來源:
SrgsGrammarCompiler.cs

XmlReader 所參考的 XML 格式的文法檔案的資料編譯成具有 .cfg 副檔名的二進位文法檔案,並將輸出傳送至資料流。

public:
 static void Compile(System::Xml::XmlReader ^ reader, System::IO::Stream ^ outputStream);
public static void Compile (System.Xml.XmlReader reader, System.IO.Stream outputStream);
static member Compile : System.Xml.XmlReader * System.IO.Stream -> unit
Public Shared Sub Compile (reader As XmlReader, outputStream As Stream)

參數

reader
XmlReader

讀取文法的 XmlReader。 文法可以存放於實體檔案或記憶體中。

outputStream
Stream

將接收編譯結果的資料流。

例外狀況

readernull

outputStreamnull

備註

所參考的 XmlReader XML 格式文法檔案必須符合 SRGS) 1.0 版 (語音辨識文法規格

如需詳細資訊,請參閱 編譯 SRGS 文法

適用於