TextToSpeech.SpeakAsync 方法

定义

重载

SpeakAsync(String, CancellationToken)

通过设备的语音转文本朗讲给定文本。

SpeakAsync(String, SpeechOptions, CancellationToken)

通过设备的语音转文本朗讲给定文本。

SpeakAsync(String, CancellationToken)

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

通过设备的语音转文本朗讲给定文本。

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

参数

text
String

要朗读的文本。

cancelToken
CancellationToken

用于停止说话的可选取消标记。

返回

具有 Task 异步操作的当前状态的 对象。

适用于

SpeakAsync(String, SpeechOptions, CancellationToken)

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

通过设备的语音转文本朗讲给定文本。

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

参数

text
String

要朗读的文本。

options
SpeechOptions

用于说话的选项。

cancelToken
CancellationToken

用于停止说话的可选取消标记。

返回

具有 Task 异步操作的当前状态的 对象。

适用于