SpeakAsync Method (String)

Microsoft Speech Platform SDK 11

Collapse imageExpand ImageCopy imageCopyHover image

Asynchronously speaks the contents of a string.

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

Syntax

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

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

Parameters

textToSpeak
Type: System..::..String

The text to speak.

Return Value

Type: Microsoft.Speech.Synthesis..::..Prompt

Returns the object that contains the content to speak.

Remarks

To synchronously speak a string that contains SSML markup, use the SpeakSsml(String) method. To asynchronously speak the contents of a string, use the SpeakAsync(String) method.

See Also