TtsEngineSsml Class
Abstract base class to be implemented by all text to speech synthesis engines.
Assembly: System.Speech (in System.Speech.dll)
To construct a custom text to speech engine, an application must always implement a class derived from the abstract base class TtsEngineSsml.
A properly registered implementation of TtsEngineSsml can then be used as a SynthesizerVoice by System.Speech.Synthesis name space based applications.
Objects inheriting from TtsEngineSsml must override the following members: TtsEngineSsml, AddLexicon, RemoveLexicon, [M:System.Speech.Synthesis.TtsEngine.TtsEngineSsml.GetOutputFormat(System.Speech.Synthesis.TtsEngine.SpeakOutputFormat,System.IntPtr),][and]Speak.
The most important member of the TtsEngineSsml class to be implemented is the Speak method.
The Speak method is called by the infrastructures text parser receiving:
-
A reference to the ITtsEngineSite interface, which provides access to system services such as even queuing and writing audio output.
-
An array of TextFragment instance produced from Speech Synthesis Markup Language (SSML) input. In addition to text to be rendered as speech, the parsing of the SSML stores information about the requested attributes of the speech in a T[:System.Speech.Synthesis.TtsEngine.FragmentState] instance associated with each incoming TextFragment object.
A speech synthesizer application can optionally make requests for a specified output format by implementing GetOutputFormat to be called by the platform when it tries to provide the correct audio output.
And implementer can also provide support for managing external definitions of pronunciations, or lexicons, by their implementation of AddLexicon and RemoveLexicon.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.