AI2 Component
(Version nb184)
|
Public Member Functions | |
ExternalTextToSpeech (ComponentContainer container, TextToSpeechCallback callback) | |
void | speak (String message, Locale loc) |
void | onDestroy () |
void | onStop () |
void | onResume () |
void | setPitch (float pitch) |
void | setSpeechRate (float speechRate) |
void | resultReturned (int requestCode, int resultCode, Intent data) |
int | isLanguageAvailable (Locale loc) |
boolean | isInitialized () |
Wrapper class for delegating calls to an external text-to-speech library for devices lacking an internal text-to-speech library (pre-1.6).
Definition at line 29 of file ExternalTextToSpeech.java.
com.google.appinventor.components.runtime.util.ExternalTextToSpeech.ExternalTextToSpeech | ( | ComponentContainer | container, |
TextToSpeechCallback | callback | ||
) |
Definition at line 41 of file ExternalTextToSpeech.java.
boolean com.google.appinventor.components.runtime.util.ExternalTextToSpeech.isInitialized | ( | ) |
Implements com.google.appinventor.components.runtime.util.ITextToSpeech.
Definition at line 104 of file ExternalTextToSpeech.java.
int com.google.appinventor.components.runtime.util.ExternalTextToSpeech.isLanguageAvailable | ( | Locale | loc | ) |
Implements com.google.appinventor.components.runtime.util.ITextToSpeech.
Definition at line 99 of file ExternalTextToSpeech.java.
void com.google.appinventor.components.runtime.util.ExternalTextToSpeech.onDestroy | ( | ) |
This will be called when the Activity is destroyed, to give us a chance to cleanup resources, if necessary.
Implements com.google.appinventor.components.runtime.util.ITextToSpeech.
Definition at line 63 of file ExternalTextToSpeech.java.
void com.google.appinventor.components.runtime.util.ExternalTextToSpeech.onResume | ( | ) |
This will be called when the Activity is resumed, to give us a chance to re-initialize resources, if necessary.
Implements com.google.appinventor.components.runtime.util.ITextToSpeech.
Definition at line 73 of file ExternalTextToSpeech.java.
void com.google.appinventor.components.runtime.util.ExternalTextToSpeech.onStop | ( | ) |
This will be called when the Activity is stopped, to give us a chance to cleanup resources, if necessary.
Implements com.google.appinventor.components.runtime.util.ITextToSpeech.
Definition at line 68 of file ExternalTextToSpeech.java.
void com.google.appinventor.components.runtime.util.ExternalTextToSpeech.resultReturned | ( | int | requestCode, |
int | resultCode, | ||
Intent | data | ||
) |
The callback method used to report Activity results back to the caller.
requestCode | the originally passed in request code. Used to identify the call. |
resultCode | the returned result code: android.app.Activity#RESULT_OK or android.app.Activity#RESULT_CANCELED |
data | the returned data, encapsulated as an Intent. |
Implements com.google.appinventor.components.runtime.ActivityResultListener.
Definition at line 88 of file ExternalTextToSpeech.java.
void com.google.appinventor.components.runtime.util.ExternalTextToSpeech.setPitch | ( | float | pitch | ) |
Sets the speech pitch for the TextToSpeech
pitch | 1.0 is the normal pitch, lower values lower the tone of the synthesized voice, greater values increase it. |
Implements com.google.appinventor.components.runtime.util.ITextToSpeech.
Definition at line 78 of file ExternalTextToSpeech.java.
void com.google.appinventor.components.runtime.util.ExternalTextToSpeech.setSpeechRate | ( | float | speechRate | ) |
Sets the speech rate
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). |
Implements com.google.appinventor.components.runtime.util.ITextToSpeech.
Definition at line 83 of file ExternalTextToSpeech.java.
void com.google.appinventor.components.runtime.util.ExternalTextToSpeech.speak | ( | String | message, |
Locale | loc | ||
) |
Speaks the given message corresponding to the language and country of the given locale.
message | the message to speak |
loc | the locale to use |
Implements com.google.appinventor.components.runtime.util.ITextToSpeech.
Definition at line 48 of file ExternalTextToSpeech.java.