public final class TtsOptions
- Object
- TtsOptions
Tuning knobs for
TextToSpeech.speak(String, TtsOptions).Constructors
public TtsOptions() |
Methods
Inherited methods
Constructor details
TtsOptions
public TtsOptions()Method details
setLanguageTag
public TtsOptions setLanguageTag(String tag)BCP-47 language tag (
"en-US", "ja-JP" etc.). When null,
the device’s default voice is used.getLanguageTag
public String getLanguageTag()setVoiceId
public TtsOptions setVoiceId(String id)Platform-specific voice identifier obtained from
TextToSpeech.getAvailableVoices(). When null the default
voice for the language tag is used.getVoiceId
public String getVoiceId()setRate
public TtsOptions setRate(float r)Speaking rate.
1.0 is the platform default; 0.5 is half
speed; 2.0 is double. Clamped per-platform.getRate
public float getRate()setPitch
public TtsOptions setPitch(float p)Pitch multiplier.
1.0 is the platform default. Clamped
per-platform.getPitch
public float getPitch()setVolume
public TtsOptions setVolume(float v)Output volume in
[0.0, 1.0].getVolume
public float getVolume()