![Collapse image Collapse image](collapse_all.gif)
![Expand Image Expand Image](expand_all.gif)
![](collapse_all.gif)
![](expand_all.gif)
![](dropdown.gif)
![](dropdownHover.gif)
![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Synchronously speaks the contents of a string.
Namespace:
Microsoft.Speech.Synthesis
Assembly:
Microsoft.Speech (in Microsoft.Speech.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub Speak ( _ textToSpeak As String _ ) |
Visual Basic (Usage) |
---|
Dim instance As SpeechSynthesizer Dim textToSpeak As String instance.Speak(textToSpeak) |
C# |
---|
public void Speak( string textToSpeak ) |
Parameters
- textToSpeak
- Type: System..::..String
The text 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.