語言

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);
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 類別的文字類型及為準確呈現所含文字所需的細節程度。

對應 <say-as> 於 SSML 規範中的 XML 標籤

論證可能是 null。

prosody
Prosody

一個 Prosody 指示語音輸出特徵的物件,如音高、說話速度和音量。

對應 <prosody> 於 SSML 規範中的 XML 標籤。

phonemes
Char[]

一組 char 物件陣列,依據國際音標(IPA)規範,提供包含於 TextFragment的文字語音發音。

對應 <phoneme> 於 SSML 規範中的 XML 標籤。

此論證可能為 null。

備註

通常,應用程式不會直接建構 FragmentState 物件。 取而代之的是 FragmentState ,應用程式使用命名空間的 System.Speech.Synthesis 成員來建立實例。

若 TtsEngineAction 參數指定的 action 值為 Silence,則參數提供的值 emphasis 為:

  • 若為正,則為暫停時間(毫秒)

  • 若為負,則列舉中的 EmphasisBreak 一個成員

若 TtsEngineAction 參數指定的 action 值不是 Silence,則該 emphasis 參數必須型別 EmphasisWord為 。

如果參數的值duration與屬性或Duration參數指定的Prosody物件不同,則會使用物件上的prosodyProsody值。

適用於

另請參閱