Blocking in ttslib

hi, I’m trying to use ttslib in order to apply text recognition in my code. The problem is that the code does not continue until the entire sentence has been completed, so for example in this code the word “hello” will not be printed until the entire text has been completed.

tts.speakLeft( “I am on the left” );
print(“hello”);

I’ve tried to use threads for this but I’m not sure how to apply it.
I would appreciate any help! thanks in advance!

Can you show us your attempt of using thread()?

Hi! Thank you very much for the reply:)
I’ve managed to solve it by now but I have one question left: is it possible to pass parameters to the method I’m calling in the thread?

No. You’d need to rely on “global” variables or create an actual Thread subclass:

great, thank you very much!

Hi

https://www.local-guru.net/blog/pages/ttslib