Share via


TextToSpeech.SpeakAsync Method

Definition

Overloads

SpeakAsync(String, CancellationToken)

Speaks the given text through the device's speech-to-text.

SpeakAsync(String, SpeechOptions, CancellationToken)

Speaks the given text through the device's speech-to-text.

SpeakAsync(String, CancellationToken)

Source:
TextToSpeech.shared.cs
Source:
TextToSpeech.shared.cs

Speaks the given text through the device's speech-to-text.

public static System.Threading.Tasks.Task SpeakAsync (string text, System.Threading.CancellationToken cancelToken = default);
static member SpeakAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Shared Function SpeakAsync (text As String, Optional cancelToken As CancellationToken = Nothing) As Task

Parameters

text
String

The text to speak.

cancelToken
CancellationToken

Optional cancellation token to stop speaking.

Returns

A Task object with the current status of the asynchronous operation.

Applies to

SpeakAsync(String, SpeechOptions, CancellationToken)

Source:
TextToSpeech.shared.cs
Source:
TextToSpeech.shared.cs

Speaks the given text through the device's speech-to-text.

public static System.Threading.Tasks.Task SpeakAsync (string text, Microsoft.Maui.Media.SpeechOptions? options, System.Threading.CancellationToken cancelToken = default);
static member SpeakAsync : string * Microsoft.Maui.Media.SpeechOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Shared Function SpeakAsync (text As String, options As SpeechOptions, 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