Share via


ITextToSpeech.SpeakAsync(String, SpeechOptions, CancellationToken) Method

Definition

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