PromptBuilder.AppendTextWithAlias(String, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在物件上附加文字 PromptBuilder ,並指定要用別名文字取代附加文字。
public:
void AppendTextWithAlias(System::String ^ textToSpeak, System::String ^ substitute);
public void AppendTextWithAlias(string textToSpeak, string substitute);
member this.AppendTextWithAlias : string * string -> unit
Public Sub AppendTextWithAlias (textToSpeak As String, substitute As String)
參數
- textToSpeak
- String
包含文字表示的字串。
- substitute
- String
一個包含要說文字的字串。
範例
以下範例將文字字串(「語音合成標記語言」)及其別名(「SSML」)附加到物件 PromptBuilder 上。 合成器會發音為「S S M L」。
PromptBuilder alias = new PromptBuilder();
alias.AppendTextWithAlias("Speech Synthesis Markup Language","SSML");
備註
這使得文件同時包含口頭與書面提示形式。 例如,書面形式可以是縮寫,例如 SAPI,而口語形式則可能是縮寫的擴展文字,在此案例中稱為語音應用程式介面(Speech Application Programming Interface)。