SpeechSynthesizer.SpeakAsyncCancel(Prompt) 方法

定義

取消已佇列提示的非同步合成作業。

public:
 void SpeakAsyncCancel(System::Speech::Synthesis::Prompt ^ prompt);
public void SpeakAsyncCancel (System.Speech.Synthesis.Prompt prompt);
member this.SpeakAsyncCancel : System.Speech.Synthesis.Prompt -> unit
Public Sub SpeakAsyncCancel (prompt As Prompt)

參數

prompt
Prompt

要取消其語音讀出作業的內容。

備註

您也可以使用這個方法來取消下列專案的非同步說話作業:

當您呼叫 SpeechSynthesizer.SpeakAsync 、 或 SpeakSsmlAsyncSpeechSynthesizer.SpeakAsync ,System.Speech 會 Prompt 建立 物件,並填入方法參數的內容,並傳回 Prompt 物件。 如果您保留傳 Prompt 回的 複本,您可以將它傳遞至 SpeakAsyncCancel ,以取消 或 PromptBuilder 物件中指定的 String 說話內容。

適用於