How can i make the receiving data (word )from Bluetooth module display in the text box and also translate it in speech without clicking text to speech button

Speech runs at a different rate than incoming data, so you need a list to act as a queue.

This sample does not include connection and permissions, just receipt of data sent via println().

Designer

initialize global message to

initialize global speech_queue to

Screen1.Initialize - I use a Line Feed (10) Message Delimiter

Speech is started only after adding a message to an empty speech queue, or finishing a current announcement. If the speech queue is not empty, a speech action must already be in progress and we just add the incoming message to the queue.

BlueTooth_delimited_speech.aia (3.2 KB)

If you need translation in addition to speech, that's an extra queue, feeding the speech queue.
(I am not sure if you want that. Ask for it, and I will add it.)

1 Like