TtsEngineSsml Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Abstract base class to be implemented by all text to speech synthesis engines.
public ref class TtsEngineSsml abstract
public abstract class TtsEngineSsml
type TtsEngineSsml = class
Public MustInherit Class TtsEngineSsml
- Inheritance
-
TtsEngineSsml
Remarks
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 synthesizer voice by System.Speech.Synthesis name space based applications.
Objects inheriting from TtsEngineSsml must override the following members: TtsEngineSsml, AddLexicon, RemoveLexicon, GetOutputFormat 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 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.
An implementer can also provide support for managing external definitions of pronunciations, or lexicons, by their implementation of AddLexicon and RemoveLexicon.
Constructors
TtsEngineSsml(String) |
Constructs a new instance of TtsEngineSsml based on an appropriate Voice Token registry key. |
Methods
AddLexicon(Uri, String, ITtsEngineSite) |
Adds a lexicon to the |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetOutputFormat(SpeakOutputFormat, IntPtr) |
Returns the best matching audio output supported by a given synthesize engine response to a request to the synthesizer engine for the support of a particular output format. |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
RemoveLexicon(Uri, ITtsEngineSite) |
Removes a lexicon currently loaded by the |
Speak(TextFragment[], IntPtr, ITtsEngineSite) |
Renders specified TextFragment array in the specified output format. |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |