Methods Summary |
---|
public java.lang.String[] | getClientDefaultLanguage()Returns a default TTS language, country and variant as set by the user.
Can be called from multiple threads.
|
public java.lang.String | getDefaultVoiceNameFor(java.lang.String lang, java.lang.String country, java.lang.String variant)Return a name of the default voice for a given locale.
This allows {@link TextToSpeech#getVoice} to return a sensible value after a client calls
{@link TextToSpeech#setLanguage}.
|
public java.lang.String[] | getFeaturesForLanguage(java.lang.String lang, java.lang.String country, java.lang.String variant)Returns a list of features available for a given language. Elements of the returned
string array can be passed in as keys to {@link TextToSpeech#speak} and
{@link TextToSpeech#synthesizeToFile} to select a given feature or features to be
used during synthesis.
|
public java.lang.String[] | getLanguage()Returns the language, country and variant currently being used by the TTS engine.
Can be called from multiple threads.
|
public java.util.List | getVoices()Get the array of available voices.
|
public int | isLanguageAvailable(java.lang.String lang, java.lang.String country, java.lang.String variant)Checks whether the engine supports a given language.
|
public boolean | isSpeaking()Checks whether the service is currently playing some audio.
|
public int | loadLanguage(android.os.IBinder caller, java.lang.String lang, java.lang.String country, java.lang.String variant)Notifies the engine that it should load a speech synthesis language.
|
public int | loadVoice(android.os.IBinder caller, java.lang.String voiceName)Notifies the engine that it should load a speech synthesis voice.
|
public int | playAudio(android.os.IBinder callingInstance, android.net.Uri audioUri, int queueMode, android.os.Bundle params, java.lang.String utteranceId)Plays an existing audio resource.
|
public int | playSilence(android.os.IBinder callingInstance, long duration, int queueMode, java.lang.String utteranceId)Plays silence.
|
public void | setCallback(android.os.IBinder caller, android.speech.tts.ITextToSpeechCallback cb)Sets the callback that will be notified when playback of utterance from the
given app are completed.
|
public int | speak(android.os.IBinder callingInstance, java.lang.CharSequence text, int queueMode, android.os.Bundle params, java.lang.String utteranceId)Tells the engine to synthesize some speech and play it back.
|
public int | stop(android.os.IBinder callingInstance)Interrupts the current utterance (if from the given app) and removes any utterances
in the queue that are from the given app.
|
public int | synthesizeToFileDescriptor(android.os.IBinder callingInstance, java.lang.CharSequence text, android.os.ParcelFileDescriptor fileDescriptor, android.os.Bundle params, java.lang.String utteranceId)Tells the engine to synthesize some speech and write it to a file.
|