Android Question Using TTS Synchronously

Darren Williams

New Member
Licensed User
Longtime User
Hi All,

I'm developing a kids spelling app and I need to wait for the TTS.Speak() method to finish before executing the next line of code as I need to synchronize the spoken word to a visual display.

I've tried using PhoneEvents.TextToSpeechFinish but this doesn't seem to work consistently - either that or I misunderstand how this is supposed to work!

So, please does anyone have suggestions on how I can achieve this?

Many Thanks!
 
Last edited:

Darren Williams

New Member
Licensed User
Longtime User
Erel,

Thanks for your help with this, using the JavaObject method works great.

As a side note, there is an UtteranceProgressListener defined within the android.speech.tts API, so I guess it would be possible to extended the B4A TTS library to raise an event using this a trigger?
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Hi Darren,
How the UtteranceProgressListener event is fired? after every word or after the whole phrase (or sentence)?
If every word then this will be very helpful for synchronization in games and cartoon figures.
 
Upvote 0
Top