SpeakSsmlAsync Method

Microsoft Speech Platform SDK 11

Collapse image Expand Image Copy image CopyHover image

Asynchronously speaks a String that contains SSML markup.

Namespace:  Microsoft.Speech.Synthesis
Assembly:  Microsoft.Speech (in Microsoft.Speech.dll)

Syntax

Visual Basic (Declaration)
Public Function SpeakSsmlAsync ( _
	textToSpeak As String _
) As Prompt
Visual Basic (Usage)
Dim instance As SpeechSynthesizer
Dim textToSpeak As String
Dim returnValue As Prompt

returnValue = instance.SpeakSsmlAsync(textToSpeak)
C#
public Prompt SpeakSsmlAsync(
	string textToSpeak
)

Parameters

textToSpeak
Type: System..::..String

The SMML markup to speak.

Remarks

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 (Microsoft.Speech).

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.

  • SpeakProgress. Raised each time the synthesizer completes speaking a word.

  • 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 SpeakSsmlAsync(String) operation.

See Also