public interface ITextToSpeech
Modifier and Type | Interface and Description |
---|---|
static interface |
ITextToSpeech.TextToSpeechCallback
Callback specifying methods for successful and failed attempts to generate speech.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isInitialized() |
int |
isLanguageAvailable(java.util.Locale loc) |
void |
onDestroy()
This will be called when the Activity is destroyed, to give us a chance to cleanup resources,
if necessary.
|
void |
onResume()
This will be called when the Activity is resumed, to give us a chance to re-initialize
resources, if necessary.
|
void |
onStop()
This will be called when the Activity is stopped, to give us a chance to cleanup resources,
if necessary.
|
void |
setPitch(float pitch)
Sets the speech pitch for the TextToSpeech
|
void |
setSpeechRate(float speechRate)
Sets the speech rate
|
void |
speak(java.lang.String message,
java.util.Locale loc)
Speaks the given message corresponding to the language and country of the given locale.
|
void speak(java.lang.String message, java.util.Locale loc)
message
- the message to speakloc
- the locale to usevoid onStop()
void onResume()
void onDestroy()
void setPitch(float pitch)
pitch
- 1.0 is the normal pitch, lower values lower the tone of the synthesized voice,
greater values increase it.void setSpeechRate(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).int isLanguageAvailable(java.util.Locale loc)
boolean isInitialized()