Android Tutorial Android Text To Speech example

Status
Not open for further replies.

jmeuse2

Member
Licensed User
Longtime User
Can you revert the speech back to text to help solve format disarrangement in text reflow?

Sent from my SAMSUNG-SGH-I847 using Tapatalk 2
 

Shadow&Max

Active Member
Licensed User
Longtime User
I've got TTS working in some places in my app, but in the startup, I can never get the TTS1_Ready sub to fire on initialize. It simply executes the line and goes to the next, but it's NOT initializing there. My TTS is TTS1, the sub is TTS1_Ready, the call to it is TTS1.Initialize("TTS1"), and yet it never gets to the TTS1_Ready sub... what could possibly be wrong? I know that in this sequence, it's not being initialized anywhere else first... But I need this to work and for the life of me, I can't seem to get it to trigger.

FYI, I've closed the Genymotion emulator and started from scratch, and it still doesn't fire...

OK, I'm going to modify this a bit... I used another device from Geny, and it triggered there. Is this completely device dependent?

More... I put a messagebox in the sub to see if and when it fires, and it doesn't fire as expected. I put a breakpoint by the TTS1.Initialize("TTS1") statement... As I step through, it obviously executes that line, then goes on with the program... LATER, it hits that _Ready proc... But at a very unexpected time, and not when anything to do with Text To Speech is happening.

Any suggestions would be greatly appreciated...
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
As I step through, it obviously executes that line, then goes on with the program... LATER, it hits that _Ready proc... But at a very unexpected time, and not when anything to do with Text To Speech is happening.
This is the expected behavior.

It prepares the text to speech service in the background and fires the Ready event when it is ready.
 

Shadow&Max

Active Member
Licensed User
Longtime User
How long should you have to wait to be able to use it Erel? If I initialize it and need to use it, is there any way to know how long it will be before I can actually have it speak? To be clear, I should do everything I want to do if it's automatically running through a list, reading items, in the Ready sub?
 

Shadow&Max

Active Member
Licensed User
Longtime User
OK, thanks Erel...
 

EvgenyB4A

Active Member
Licensed User
Longtime User
I have installed Ron Hebrew TTS on my phone, added 'he'' on language spinner at TTS code example, but after selecting "he" I get toastmessage " Language data not found"
 

EvgenyB4A

Active Member
Licensed User
Longtime User
Have you set it to be the default speech engine (under Settings - Language)?
I changed TTS engine in Settings->Language-->Speech->TTS parameters to Ron Hebrew and now the TTS example can speak Hebrew(only) in trial version.
Thank you very much first of all.
The next question is how to change TTS engines by B4A?
 

AndyW999

Member
Licensed User
Longtime User
Can TTS be used from a service module to speak an announcement instead of a ring tone when the device is 'asleep'?

Thought I would ask before trying it

Thanks

Andy.
 

Douglas Farias

Expert
Licensed User
Longtime User
@Erel
how can i make to read big texts ?
my internet is fast 15mb + but all big text dont read =(
 

pmsmc

Member
Licensed User
Longtime User
Hi Erel,
I am developing a application that uses both TTS and Voice recognition.
when I ask a user for and answer, using TTS, and then use VR to catch the user responde, every time I get back to TSS I get an error, saying that the Speech engine is not ready, but i have never released it form memory.
Also, is there a way to send a string to TTS and only continue the application after the TextToSpeechFinish event ?

Best Regards,
Pedro
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…