FragmentState Constructor (TtsEngineAction, Int32, Int32, Int32, SayAs, Prosody, Char[])


Constructs a new instance of FragmentState.

Namespace:   System.Speech.Synthesis.TtsEngine
Assembly:  System.Speech (in System.Speech.dll)

public FragmentState(
	TtsEngineAction action,
	int langId,
	int emphasis,
	int duration,
	SayAs sayAs,
	Prosody prosody,
	char[] phonemes


Type: System.Speech.Synthesis.TtsEngine.TtsEngineAction

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

Type: System.Int32

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

Type: System.Int32

The emphasis to be applied to speech output or pauses.

Type: System.Int32

The time allotted to speak the text of the TextFragment.

Type: System.Speech.Synthesis.TtsEngine.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.

Type: System.Speech.Synthesis.TtsEngine.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

Type: System.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.

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 EmphasisBreakenumeration

If the TtsEngineAction value specified by the action argument is not Silenceemphasis 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.

.NET Framework
Available since 3.0
Return to top