public class TextToSpeech extends AndroidNonvisibleComponent implements Component, OnStopListener, OnResumeListener, OnDestroyListener
form
ACCELEROMETER_SENSITIVITY_MODERATE, ACCELEROMETER_SENSITIVITY_STRONG, ACCELEROMETER_SENSITIVITY_WEAK, ALIGNMENT_CENTER, ALIGNMENT_NORMAL, ALIGNMENT_OPPOSITE, ASSET_DIRECTORY, BUTTON_SHAPE_DEFAULT, BUTTON_SHAPE_OVAL, BUTTON_SHAPE_RECT, BUTTON_SHAPE_ROUNDED, COLOR_BLACK, COLOR_BLUE, COLOR_CYAN, COLOR_DEFAULT, COLOR_DKGRAY, COLOR_GRAY, COLOR_GREEN, COLOR_LTGRAY, COLOR_MAGENTA, COLOR_NONE, COLOR_ORANGE, COLOR_PINK, COLOR_RED, COLOR_WHITE, COLOR_YELLOW, DEFAULT_VALUE_COLOR_BLACK, DEFAULT_VALUE_COLOR_BLUE, DEFAULT_VALUE_COLOR_CYAN, DEFAULT_VALUE_COLOR_DEFAULT, DEFAULT_VALUE_COLOR_DKGRAY, DEFAULT_VALUE_COLOR_GRAY, DEFAULT_VALUE_COLOR_GREEN, DEFAULT_VALUE_COLOR_LTGRAY, DEFAULT_VALUE_COLOR_MAGENTA, DEFAULT_VALUE_COLOR_NONE, DEFAULT_VALUE_COLOR_ORANGE, DEFAULT_VALUE_COLOR_PINK, DEFAULT_VALUE_COLOR_RED, DEFAULT_VALUE_COLOR_WHITE, DEFAULT_VALUE_COLOR_YELLOW, DIRECTION_EAST, DIRECTION_MAX, DIRECTION_MIN, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_NORTHEAST, DIRECTION_NORTHWEST, DIRECTION_SOUTH, DIRECTION_SOUTHEAST, DIRECTION_SOUTHWEST, DIRECTION_WEST, FONT_DEFAULT_SIZE, LAYOUT_ORIENTATION_HORIZONTAL, LAYOUT_ORIENTATION_VERTICAL, LENGTH_FILL_PARENT, LENGTH_PREFERRED, LENGTH_UNKNOWN, SLIDER_MAX_VALUE, SLIDER_MIN_VALUE, SLIDER_THUMB_VALUE, TOAST_LENGTH_LONG, TOAST_LENGTH_SHORT, TYPEFACE_DEFAULT, TYPEFACE_MONOSPACE, TYPEFACE_SANSSERIF, TYPEFACE_SERIF
Constructor and Description |
---|
TextToSpeech(ComponentContainer container)
Creates a TextToSpeech component.
|
Modifier and Type | Method and Description |
---|---|
void |
AfterSpeaking(boolean result)
Event to raise after the message is spoken.
|
YailList |
AvailableCountries() |
YailList |
AvailableLanguages() |
void |
BeforeSpeaking()
Event to raise when Speak is invoked, before the message is spoken.
|
java.lang.String |
Country()
Gets the country for this TextToSpeech component.
|
void |
Country(java.lang.String country)
Sets the country for this TextToSpeech component.
|
java.lang.String |
Language()
Gets the language for this TextToSpeech component.
|
void |
Language(java.lang.String language)
Sets the language for this TextToSpeech component.
|
void |
onDestroy() |
void |
onResume() |
void |
onStop() |
float |
Pitch()
Reports the current value of speech pitch
|
void |
Pitch(float pitch)
Sets the speech pitch for the TextToSpeech.
|
void |
prepareLanguageAndCountryProperties() |
boolean |
Result()
Result property getter method.
|
void |
Speak(java.lang.String message)
Speaks the given message.
|
float |
SpeechRate()
Reports the current value of speechRate
|
void |
SpeechRate(float speechRate)
Sets the speech rate
|
getDispatchDelegate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDispatchDelegate
public TextToSpeech(ComponentContainer container)
container
- container, component will be placed inpublic boolean Result()
public void Language(java.lang.String language)
language
- is the ISO2 (i.e. 2 letter) or ISO3 (i.e. 3 letter) language code to set this
TextToSpeech component to.public void Pitch(float pitch)
pitch
- a pitch level between 0 and 2public float Pitch()
public void SpeechRate(float speechRate)
speechRate
- Speech rate 1.0 is the normal speech rate, lower values slow down the
speech (0.5 is half the normal speech rate), greater values
accelerate it (2.0 is twice the normal speech rate).public float SpeechRate()
public java.lang.String Language()
public void Country(java.lang.String country)
country
- is the ISO2 (i.e. 2 letter) or ISO3 (i.e. 3 letter) country code to set this
TextToSpeech component to.public java.lang.String Country()
public YailList AvailableLanguages()
public YailList AvailableCountries()
public void prepareLanguageAndCountryProperties()
public void Speak(java.lang.String message)
public void BeforeSpeaking()
public void AfterSpeaking(boolean result)
result
- whether the message was successfully spokenpublic void onStop()
onStop
in interface OnStopListener
public void onResume()
onResume
in interface OnResumeListener
public void onDestroy()
onDestroy
in interface OnDestroyListener