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.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
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.