ITextToSpeech.SpeakAsync(String, SpeechOptions, CancellationToken) Method
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.
Speaks the given text through the device's speech-to-text.
public System.Threading.Tasks.Task SpeakAsync (string text, Microsoft.Maui.Media.SpeechOptions? options = default, System.Threading.CancellationToken cancelToken = default);
abstract member SpeakAsync : string * Microsoft.Maui.Media.SpeechOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SpeakAsync (text As String, Optional options As SpeechOptions = Nothing, Optional cancelToken As CancellationToken = Nothing) As Task
Parameters
- text
- String
The text to speak.
- options
- SpeechOptions
The options to use for speaking.
- cancelToken
- CancellationToken
Optional cancellation token to stop speaking.
Returns
A Task object with the current status of the asynchronous operation.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.