I have a problem with tts_ready event. This is the code
boolTTS is a global variable that saves (obviously) the state of TTS. Here is the code for speaking text the first time:
I use the Do/Loop event to ensure the TTS engine is ready before speaking the text. If I run the program step to step the execution works fine. If I run the program 'normally' it doesn´t work and hangs up.
I don´t want to put the tts1.speak line into tts1_ready event.
B4X:
Sub TTS1_Ready (Success As Boolean)
If Success Then
boolTTS = True
End If
End Sub
boolTTS is a global variable that saves (obviously) the state of TTS. Here is the code for speaking text the first time:
B4X:
TTS1.Initialize("TTS1")
Do While boolTTS = False
Loop
TTS1.Speak(strlinea,True)
I use the Do/Loop event to ensure the TTS engine is ready before speaking the text. If I run the program step to step the execution works fine. If I run the program 'normally' it doesn´t work and hangs up.
I don´t want to put the tts1.speak line into tts1_ready event.