send intent to start TTS service useable in Tasker?

169 views
Skip to first unread message

Amir S.

unread,
Nov 7, 2014, 9:51:45 PM11/7/14
to tas...@googlegroups.com
20% of the time the actions 'say' & 'say to file' do not speak aloud because the TTS fails to initiate (as tasks and in exportes apps) so i want to make sure the TTS engine is ready before doing the say action.


I found the intent that starts the TTS service, but since there's no indication of it being started, should this be as a broadcast intent?


From android documentary:
Intent for starting a TTS service. Services that handle this intent must extend TextToSpeechService. Normal applications should not use this intent directly, instead they should talk to the TTS service using the the methods in this class.

Constant Value: "android.intent.action.TTS_SERVICE"

Pent

unread,
Nov 8, 2014, 3:59:38 AM11/8/14
to tas...@googlegroups.com
You can't just send an intent, you need to handle java object, callbacks etc to use TTS.

The next Tasker version you could theoretically cause the speech to happen because you
can get a TTS Java object and do things with it, but you can't get feedback without the callbacks
(signals for 'speech started', 'error ocurred' etc)

I will think about implementing callbacks when I see if people are using Java or not with
Tasker.

Pent

twizzlerite

unread,
Dec 29, 2014, 11:32:14 PM12/29/14
to tas...@googlegroups.com
Forgive me and please tell me if this constitutes a thread necro, but this was a top search result for Java callbacks in Tasker. I would love it, and it would make it possible to implement our own variables updated through ContentObserver. I have been wanting a variable or state for auto-rotate and occasionally have wanted them for other obscure things like the now-obsolete vibrate-on-notify. Java features have allowed me to do a lot of automation without writing an app for it, including exploring the possibilities of Android's API, so I love them.

Amir S.

unread,
Jul 5, 2015, 10:50:23 AM7/5/15
to tas...@googlegroups.com
So now that Java functions has been added to Tasker, how can we call the TTS engine and make sure its on and will be available to read aloud text with the say action rather than failing sometimes to initiate the tts engine?

Reply all
Reply to author
Forward
0 new messages