इसके माध्यम से साझा किया गया


FragmentState Constructor

Definition

Constructs a new instance of 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())

Parameters

action
TtsEngineAction

A member of the TtsEngineAction enumeration that specifies a speech synthesis action.

langId
Int32

The id of the language being used. Corresponds to the XML xml:lang attribute.

emphasis
Int32

The emphasis to be applied to speech output or pauses.

duration
Int32

The time allotted to speak the text of the TextFragment.

sayAs
SayAs

A member of the SayAs class, indicating the type of text of the TextFragment and the level of detail required for accurate rendering of the contained text.

Corresponds to the <say-as> XML tag in the SSML specification

The argument may be null.

prosody
Prosody

A Prosody object indicating characteristics of the speech output such as pitch, speaking rate and volume.

Corresponds to the <prosody> XML tag in the SSML specification.

phonemes
Char[]

An array of char objects providing the phonetic pronunciation for text contained in the TextFragment, using the International Phonetic Alphabet (IPA) specification.

Corresponds to the <phoneme> XML tag in the SSML specification.

This argument may be null.

Remarks

Typically, applications do not directly construct FragmentState objects. Instead, FragmentState instances are created by applications using the members of the System.Speech.Synthesis name space.

If the TtsEngineAction value specified by the action argument is Silence, the value supplied by the emphasis argument is either:

  • If positive, the time in millisecond to pause

  • If negative a member of the EmphasisBreak enumeration

If the TtsEngineAction value specified by the action argument is not Silence, the emphasis argument must be of type EmphasisWord.

If the value of the duration argument and The Duration property or the Prosody object specified by the prosody argument differ, the value on the Prosody object is used.

Applies to

See also