Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

FragmentState Constructor

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
)

Parameters

action
Type: System.Speech.Synthesis.TtsEngine.TtsEngineAction

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

langId
Type: System.Int32

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

emphasis
Type: System.Int32

The emphasis to be applied to speech output or pauses.

duration
Type: System.Int32

The time allotted to speak the text of the TextFragment.

sayAs
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.

prosody
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

phonemes
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 Silence 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.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.