Prompt 類別

定義

代表可以藉由 SpeechSynthesizer 轉譯之項目 (文字或音訊檔案) 的相關資訊。Represents information about what can be rendered, either text or an audio file, by the SpeechSynthesizer.

public ref class Prompt
public class Prompt
type Prompt = class
Public Class Prompt
繼承
Prompt
衍生

備註

Prompt物件可以包含純文字、以標記語言格式化的文字, 或音訊檔案。A Prompt object can contain plain text, text formatted with markup language, or audio files.

系統會Prompt使用每個新的實例來PromptBuilder建立空的物件。An empty Prompt object is created with each new instance of PromptBuilder. 類別提供將內容 (包括文字、SSML 標記、書簽和預先錄製的音訊檔案) (例如 .wav 檔案) 加入其所包含之空白Prompt物件的方法。 PromptBuilderThe PromptBuilder class provides methods for adding content, including text, SSML markup, bookmarks, and prerecorded audio files (such as .wav files), to the empty Prompt object that it contains. 一般而言, 應用程式會PromptBuilder使用 (而非Prompt物件) 來建立提示, 並以內容填入。Typically, applications will use PromptBuilder, rather than a Prompt object, to create prompts and populate them with content.

若要從Prompt物件的內容產生語音, 請Speak使用方法。To generate speech from the contents of a Prompt object, use the Speak method.

建構函式

Prompt(PromptBuilder)

PromptBuilder 物件建立 Prompt 類別的新執行個體。Creates a new instance of the Prompt class from a PromptBuilder object.

Prompt(String)

建立 Prompt 類別的新執行個體並指定要說出的文字。Creates a new instance of the Prompt class and specifies the text to be spoken.

Prompt(String, SynthesisTextFormat)

建立 Prompt 類別的新執行個體,並指定需要講出的文字以及它的格式是純文字還是標記語言。Creates a new instance of the Prompt class and specifies the text to be spoken and whether its format is plain text or markup language.

屬性

IsCompleted

取得 Prompt 是否播放完畢。Gets whether the Prompt has finished playing.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於