Class TtsOptions
java.lang.Object
com.codename1.media.TtsOptions
Tuning knobs for
TextToSpeech.speak(String, TtsOptions).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatgetPitch()floatgetRate()floatsetLanguageTag(String tag) BCP-47 language tag ("en-US","ja-JP"etc.).setPitch(float p) Pitch multiplier.setRate(float r) Speaking rate.setVoiceId(String id) Platform-specific voice identifier obtained fromTextToSpeech.getAvailableVoices().setVolume(float v) Output volume in[0.0, 1.0].
-
Constructor Details
-
TtsOptions
public TtsOptions()
-
-
Method Details
-
setLanguageTag
BCP-47 language tag ("en-US","ja-JP"etc.). When null, the device's default voice is used. -
getLanguageTag
-
setVoiceId
Platform-specific voice identifier obtained fromTextToSpeech.getAvailableVoices(). When null the default voice for the language tag is used. -
getVoiceId
-
setRate
Speaking rate.1.0is the platform default;0.5is half speed;2.0is double. Clamped per-platform. -
getRate
public float getRate() -
setPitch
Pitch multiplier.1.0is the platform default. Clamped per-platform. -
getPitch
public float getPitch() -
setVolume
Output volume in[0.0, 1.0]. -
getVolume
public float getVolume()
-