damonkohler / sl4a

SL4A brings scripting languages to Android by allowing you to edit and execute scripts and interactive interpreters directly on the Android device.
Apache License 2.0
2.42k stars 804 forks source link

Add an option to make "ttsSpeak" blocking #227

Open damonkohler opened 9 years ago

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:27

I tried to make a voice menu using ttsSpeak and recognizeSpeech, however since 
ttsSpeak seems to be non-blocking it's voice was recognized too. 

I wrote a function that blocks until ttsSpeak is done but I would prefer an 
option that does that for me.

Original issue reported on code.google.com by jarrad2...@gmail.com on 7 Aug 2010 at 4:41

Copied from original issue: damonkohler/android-scripting#391

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:27

I have the same problem. How did you block ttsSpeak? Thanks

Original comment by andrea.i...@gmail.com on 18 Aug 2010 at 4:55

damonkohler commented 9 years ago

From @GoogleCodeExporter on May 31, 2015 11:27

It's just a quick & dirty solution. I made a function "say()" that first calls 
ttsSpeak() and than calls time.sleep(0.5) in while ttsIsSpeaking() is true. HTH

Original comment by jarrad2...@gmail.com on 19 Aug 2010 at 5:05