Android Question TTS example

ALBRECHT

Active Member
Licensed User
Hello,

When i try to use The TTS EREL Example, to speak some words, see there :
https://www.b4x.com/android/forum/threads/android-text-to-speech-example.7043
simply with the included TTS Library in 9.80
and with a standard 6' Emulator

i get an error :
Unexpected event (missing RaiseSynchronousEvents): tts1_ready
Check the unfiltered logs for the full stack trace.


Please, is there many changes since 2010 ?

Regards
Take care ?
Michel
 

drgottjr

Expert
Licensed User
Longtime User
i'm using the library that comes with 9.8 on sdk 28 no problem. everything is pretty much the same as in 1910 except nowadays plague is raging outside, and we use wait for when initializing the tts object. i'm guessing you don't have that, and that you also don't have a _ready event sub. the event is fired when tts is ready to go. the error seems to point to a missing _ready event.

try this in your activity_resume sub:
B4X:
   if tts.isinitialized = false then
      tts.Initialize("tts")
      wait for tts_Ready (Success As Boolean)
      TTSisReady = Success        ' i keep a global flag.  you don't have to.  also, if success is false, you may want to notify the user.  that means tts isn't ready...
   end if
 
Upvote 0

ALBRECHT

Active Member
Licensed User
With a Wait for instruction , its the same problem : the sub is waiting indefinitively

How to check if TTS is active into the Android Emulator ?

Regards
Take care ?
Michel
 
Upvote 0

ALBRECHT

Active Member
Licensed User
Even with the TTS 1.01 (replacing the 1.0 into the core)
in the sample bellow, with or without " Wait For"
the TTS is still not ready with a standard Emulator
is there a Emulator Setting ?
 

Attachments

  • TTS101.zip
    7.9 KB · Views: 271
Upvote 0

ALBRECHT

Active Member
Licensed User
Ok if The standard android emulator doesn't support this feature , i underestand better.

But i was trying with emulators to use for checking the app in mutli device mode

Many Thanks
 
Upvote 0
Top