VoiceInfo

public final class VoiceInfo


Represents information about a supported text-to-speech voice.

Instances are created by the SDK and returned from SpeechSynthesizer.getSupportedVoices.

Summary

Nested types

public enum VoiceInfo.Gender extends Enum

The gender of a voice.

Public methods

final @NonNull VoiceInfo.Gender

The gender of the voice.

final @NonNull Locale

The concrete locale of the voice, which may be more specific than the one it was looked up with.

final @NonNull String

The unique name of the voice.

Public methods

getGender

public final @NonNull VoiceInfo.Gender getGender()

The gender of the voice.

getLocale

public final @NonNull Locale getLocale()

The concrete locale of the voice, which may be more specific than the one it was looked up with. SpeechSynthesizer.checkStatus, SpeechSynthesizer.download, and the language fallback in SpeechSynthesizer.synthesize all key off this rather than the locale configured in SpeechSynthesizerOptions.

getName

public final @NonNull String getName()

The unique name of the voice.