Asynchronously speaks a String that contains SSML markup.
Assembly: System.Speech (in System.Speech.dll)
The contents of the textToSpeak parameter must include a speak element and must conform to the Speech Synthesis Markup Language (SSML) Version 1.0. For more information, see Speech Synthesis Markup Language Reference.
To synchronously speak a string that contains SSML markup, use the SpeakSsml(String) method. You can use SpeakAsync(String) to initiate the asynchronous speaking of a string that does not contain SSML markup.
During a call to this method, the SpeechSynthesizer can raise the following events:
StateChanged. Raised when the speaking state of the synthesizer changes.
SpeakStarted. Raised when the synthesizer begins generating speech.
PhonemeReached. Raised each time the synthesizer reaches a letter or combination of letters that constitute a discreet sound of speech in a language.
SpeakProgress. Raised each time the synthesizer completes speaking a word.
VisemeReached. Raised each time spoken output requires a change in the position of the mouth or the facial muscles used to produce speech.
BookmarkReached. Raised when the synthesizer encounters a bookmark in a prompt.
VoiceChange. Raised when the speaking voice for the synthesizer changes.
SpeakCompleted. Raised when the synthesizer finishes processing a operation.
- 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 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.