TextToSpeechService.OnGetDefaultVoiceNameFor(String, String, String) Method

Definition

Return a name of the default voice for a given locale.

[Android.Runtime.Register("onGetDefaultVoiceNameFor", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetOnGetDefaultVoiceNameFor_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual string? OnGetDefaultVoiceNameFor (string? lang, string? country, string? variant);
[<Android.Runtime.Register("onGetDefaultVoiceNameFor", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetOnGetDefaultVoiceNameFor_Ljava_lang_String_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member OnGetDefaultVoiceNameFor : string * string * string -> string
override this.OnGetDefaultVoiceNameFor : string * string * string -> string

Parameters

lang
String

ISO-3 language code.

country
String

ISO-3 country code. May be empty or null.

variant
String

Language variant. May be empty or null.

Returns

A name of the default voice for a given locale.

Attributes

Remarks

Return a name of the default voice for a given locale.

This method provides a mapping between locales and available voices. This method is used in TextToSpeech#setLanguage, which calls this method and then calls TextToSpeech#setVoice with the voice returned by this method.

Also, it's used by TextToSpeech#getDefaultVoice() to find a default voice for the default locale.

Java documentation for android.speech.tts.TextToSpeechService.onGetDefaultVoiceNameFor(java.lang.String, java.lang.String, java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to