[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

api[jx8,android.speech.tts] implementation

JavaObject
	buildSubclasses: #(
		#TextToSpeech
	) in: 'android.speech.tts'
	reference: 'https://developer.android.com/reference'!

TextToSpeech buildStaticFunctions: #(
	getMaxSpeechInputLength
)!
TextToSpeech buildFunctions: #(
	#(#addEarcon:packageName:resourceId: #(earcon packageName resourceId))
	#(#addEarcon:file: #(earcon #(aFile json)))
	#(#addSpeech:file: #(#(aCharSequence json) #(aFile json)))
	#(#addSpeech:packageName:resourceId: #(#(text json) packageName resourceId))
	#(#addSpeech:fileName: #(text fileName))
	#(#areDefaultsEnforced #() Boolean)
	#(#getAvailableLanguages #() "Set<Locale>"
	getDefaultEngine
	#(#getDefaultVoice #() Voice)
	#(#getEngines #() "List<TextToSpeech.EngineInfo>")
	#(#getVoice #() Voice)
	#(#getVoices #() "Set<Voice>")
	#(#isLanguageAvailable: #(#(aLocale json)) )
	#(#isSpeaking #() Boolean)
	#(#playEarcon:queueMode:params:utteranceId: #(earcon queueMode #(aBundle json) utteranceId) )
	#(#playSilentUtterance:queueMode:utteranceId: #(durationInMs queueMode utteranceId) )
	#(#setAudioAttributes: #(#(audioAttributes json)) )
	#(#setOnUtteranceProgressListener: #(#(aUtteranceProgressListener json)) )
	#(#setPitch: #(pitch))
	#(#setSpeechRate: #(speechRate))
	#(#setVoice: #(#(voice json)) )
	shutdown
	#(#speak:queueMode:params:utteranceId: #(#(aCharSequence json) queueMode #(aBundle json) utteranceId) )
	stop
	#(#synthesizeToFile:params:file:utteranceId: #(#(aCharSequence json) #(aBundle json) #(aFile json) utteranceId) )
)!

" Constructors
TextToSpeech(Context context, TextToSpeech.OnInitListener listener)
The constructor for the TextToSpeech class, using the default TTS engine.
TextToSpeech(Context context, TextToSpeech.OnInitListener listener, String engine)
The constructor for the TextToSpeech class, using the given TTS engine.

Constants
String	ACTION_TTS_QUEUE_PROCESSING_COMPLETED
Broadcast Action: The TextToSpeech synthesizer has completed processing of all the text in the speech queue.
int	ERROR
Denotes a generic operation failure.
int	ERROR_INVALID_REQUEST
Denotes a failure caused by an invalid request.
int	ERROR_NETWORK
Denotes a failure caused by a network connectivity problems.
int	ERROR_NETWORK_TIMEOUT
Denotes a failure caused by network timeout.
int	ERROR_NOT_INSTALLED_YET
Denotes a failure caused by an unfinished download of the voice data.
int	ERROR_OUTPUT
Denotes a failure related to the output (audio device or a file).
int	ERROR_SERVICE
Denotes a failure of a TTS service.
int	ERROR_SYNTHESIS
Denotes a failure of a TTS engine to synthesize the given input.
int	LANG_AVAILABLE
Denotes the language is available for the language by the locale, but not the country and variant.
int	LANG_COUNTRY_AVAILABLE
Denotes the language is available for the language and country specified by the locale, but not the variant.
int	LANG_COUNTRY_VAR_AVAILABLE
Denotes the language is available exactly as specified by the locale.
int	LANG_MISSING_DATA
Denotes the language data is missing.
int	LANG_NOT_SUPPORTED
Denotes the language is not supported.
int	QUEUE_ADD
Queue mode where the new entry is added at the end of the playback queue.
int	QUEUE_FLUSH
Queue mode where all entries in the playback queue (media to be played and text to be synthesized) are dropped and replaced by the new entry.
int	STOPPED
Denotes a stop requested by a client.
int	SUCCESS
Denotes a successful operation.

Example
http://android-developers.blogspot.com.ar/2009/09/introduction-to-text-to-speech-in.html
"

Reference