FragmentState 建構函式

定義

建構 FragmentState 的新執行個體。

public:
 FragmentState(System::Speech::Synthesis::TtsEngine::TtsEngineAction action, int langId, int emphasis, int duration, System::Speech::Synthesis::TtsEngine::SayAs ^ sayAs, System::Speech::Synthesis::TtsEngine::Prosody ^ prosody, cli::array <char> ^ phonemes);
public FragmentState (System.Speech.Synthesis.TtsEngine.TtsEngineAction action, int langId, int emphasis, int duration, System.Speech.Synthesis.TtsEngine.SayAs sayAs, System.Speech.Synthesis.TtsEngine.Prosody prosody, char[] phonemes);
new System.Speech.Synthesis.TtsEngine.FragmentState : System.Speech.Synthesis.TtsEngine.TtsEngineAction * int * int * int * System.Speech.Synthesis.TtsEngine.SayAs * System.Speech.Synthesis.TtsEngine.Prosody * char[] -> System.Speech.Synthesis.TtsEngine.FragmentState
Public Sub New (action As TtsEngineAction, langId As Integer, emphasis As Integer, duration As Integer, sayAs As SayAs, prosody As Prosody, phonemes As Char())

參數

action
TtsEngineAction

TtsEngineAction 列舉的成員,指定語音合成動作。

langId
Int32

要使用的語言 ID。 對應於 XML xml:lang 屬性。

emphasis
Int32

要套用至語音輸出或暫停的強調。

duration
Int32

所分配用於讀出 TextFragment 之文字的時間。

sayAs
SayAs

SayAs 類別的成員,表示 TextFragment 的文字類型,以及準確呈現所包含的文字所需的詳細程度。

對應於 SSML 規格中的 <say-as> XML 標記 引數可以是 null

prosody
Prosody

Prosody 物件,表示語音輸出的特性,例如音調、讀出速率和音量。

對應至 SSML 規格中的prosody > XML 標記。 <

phonemes
Char[]

char 物件的陣列,使用國際音標 (IPA) 規格為 TextFragment 中所包含的文字提供語音發音。

對應於 SSML 規格中的 <phoneme> XML 標記。

這個引數可以是 null

備註

一般而言,應用程式不會直接建構 FragmentState 物件。 相反地, FragmentState 實例是由使用名稱空間成員 System.Speech.Synthesis 的應用程式所建立。

TtsEngineAction如果引數 Silenceaction 指定的值為 ,則引數所提供的 emphasis 值為:

  • 如果為正數,則為暫停的毫秒時間

  • 如果為負數列舉的成員 EmphasisBreak

TtsEngineAction如果引數指定的 action 值不是 Silence ,則 emphasis 引數的類型必須為 EmphasisWord

如果引數的值 duration 和 屬性 DurationProsody 引數所 prosody 指定的物件不同,則會使用 物件上的 Prosody 值。

適用於

另請參閱