TextToSpeechService.OnGetVoices 方法

定义

查询服务以获取一组受支持的语音。

[Android.Runtime.Register("onGetVoices", "()Ljava/util/List;", "GetOnGetVoicesHandler")]
public virtual System.Collections.Generic.IList<Android.Speech.Tts.Voice>? OnGetVoices ();
[<Android.Runtime.Register("onGetVoices", "()Ljava/util/List;", "GetOnGetVoicesHandler")>]
abstract member OnGetVoices : unit -> System.Collections.Generic.IList<Android.Speech.Tts.Voice>
override this.OnGetVoices : unit -> System.Collections.Generic.IList<Android.Speech.Tts.Voice>

返回

支持的语音列表。

属性

注解

查询服务以获取一组受支持的语音。

可以在多个线程上调用。

默认实现尝试枚举所有可用的区域设置,将其传递给 #onIsLanguageAvailable(String, String, String) 语音实例并创建语音实例(使用区域设置的 BCP-47 语言标记作为支持的语言名称)。 请注意,此实现仅适用于单个区域设置没有多个语音的引擎。 此外,此实现不适用于方法返回 Locale#getAvailableLocales() 的集中未列出的区域设置。

适用于 . 的 android.speech.tts.TextToSpeechService.onGetVoices()Java 文档

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于