Create your own awesome maps

Even on the go

with our free apps for iPhone, iPad and Android

Get Started

Already have an account?
Log In

TextToSpeech by Mind Map: TextToSpeech
0.0 stars - 0 reviews range from 0 to 5

TextToSpeech

Constants

String

ACTION_TTS_QUEUE_PROCESSING_COMPLETED

int

ERROR

LANG_AVAILABLE

LANG_COUNTRY_AVAILABLE

LANG_COUNTRY_VAR_AVAILABLE

LANG_MISSING_DATA

LANG_NOT_SUPPORTED

QUEUE_ADD

QUEUE_FLUSH

SUCCESS

Constuctors

TextToSpeech

TextToSpeech(Context context, TextToSpeech.OnInitListener listener)

TextToSpeech(Context context, TextToSpeech.OnInitListener listener, String engine)

Methods

int

addEarcon(String earcon, String filename)

addEarcon(String earcon, String packagename, int resourceId)

addSpeech(String text, String packagename, int resourceId)

addSpeech(String text, String filename)

isLanguageAvailable(Locale loc)

playEarcon(String earcon, int queueMode, HashMap<String, String> params)

playSilence(long durationInMs, int queueMode, HashMap<String, String> params)

setEngineByPackageName(String enginePackageName)

setLanguage(Locale loc)

setOnUtteranceCompletedListener(TextToSpeech.OnUtteranceCompletedListener listener)

setOnUtteranceProgressListener(UtteranceProgressListener listener)

setPitch(float pitch)

setSpeechRate(float speechRate)

speak(String text, int queueMode, HashMap<String, String> params)

stop()

synthesizeToFile(String text, HashMap<String, String> params, String filename)

boolean

areDefaultsEnforced()

isSpeaking()

String

getDefaultEngine()

void

shutdown()

List<TextToSpeech.EngineInfo>

getEngines()

Set<String>

getFeatures(Locale locale)

Locale

getLanguage()

Basic Example

Uses

Classes Also Used- EditText as text box Button as submit option and to execute the speech option Intent as a way to commit the TextToSpeech.Engine activity to download the resources required  

TextToSpeech(Context context, TextToSpeech.OnInitListener listener)

speak(String text, int queueMode, HashMap<String, String> params)

QUEUE_ADD

Collaborating Classes

Classes that are used in Conjunction with this one to make the class more functional.

TextToSpeech.Engine

TextToSpeech.Engine.CHECK_VOICE_PASS- useful in confirming that the resources required by the TextToSpeech class are open to be used TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA- if resources are unavailable then it acquires those resources inorder to allow for the TextToSpeech class to use at a later date

Intent

Used to run activities required by the TextToSpeech.Engine

Locale

Used in changing the language used in the TextToSpeech class

Method Classification

Add Playback Data

addEarcon(String earcon, String filename)

addEarcon(String earcon, String packagename, int resourceId)

addSpeech(String text, String packagename, int resourceId)

addSpeech(String text, String packagename, int resourceId)

addSpeech(String text, String filename)

Playback Options

playSilence(long durationInMs, int queueMode, HashMap<String, String> params)

playEarcon(String earcon, int queueMode, HashMap<String, String> params)

speak(String text, int queueMode, HashMap<String, String> params)

stop()

shutdown()

Playback Formatting

setSpeechRate(float speechRate)

setLanguage(Locale loc)

setOnUtteranceCompletedListener(TextToSpeech.OnUtteranceCompletedListener listener)

setOnUtteranceProgressListener(UtteranceProgressListener listener)

setPitch(float pitch)

setEngineByPackageName(String enginePackageName)

Playback File Generation

synthesizeToFile(String text, HashMap<String, String> params, String filename)

Playback Conditions

isLanguageAvailable(Locale loc)

getLanguage()

areDefaultsEnforced()