Android Question More activities and text to speach

Giusy

Active Member
Licensed User
hi,
I have more activities and each may utilize Text to speach.
how I can organize then program?

Activity1 ----file txt aaa-----
Activity2 ----file txt bbb----- Text to speach aaa, bbb, ccc
activity3 ----file txt ccc-----

What can I write in Activities 1 2 3, what can I create for Text to Speach (module code or other?) and what can I write and where for initialize TTs?
Thanks
 

BillMeyer

Well-Known Member
Licensed User
Longtime User
Hi,
Very easy. Begin here (Top right of your screen)

upload_2018-6-18_10-11-31.png


Then you get a choice like this one - Try it: https://www.b4x.com/android/forum/threads/android-text-to-speech-example.7043/

It works very well actually (both TTS and the Search Function)

Enjoy !!
 
Upvote 0

Giusy

Active Member
Licensed User
Bill Meyer, yes, I know this example, but it work in only one activity. I don't want start a new activity for TTS from my activities 1 2 3.
I want to know how call tts from activity 1 2 3.
 
Upvote 0

Giusy

Active Member
Licensed User
Erel, Unfortunately I did not succeed :(
-main and starter-
What should I write in main to load starter and speach a variable memorized in main?
I am very sad :/
 
Upvote 0

Giusy

Active Member
Licensed User
It work very well.
One last question and I really hope it's the last one:

Sub buttonREAD_Click
stringa = File.ReadString(File.DirAssets,"FILE.txt") 'read txt file
CallSub2(Starter, "Speak", stringa)
end sub

Sub buttonPAUSE_Click

???

End Sub

Sub buttonSTOP_Click

???

End Sub

Thanks
 
Upvote 0

Giusy

Active Member
Licensed User
Erel, it's possible to return from starter "CallSub2(Starter, "Speak", st)" only when speak is terminate?
Thanks
 
Upvote 0

Giusy

Active Member
Licensed User
Resolved :D
I have split my big text for TTs and i have substitute tts.Speak(text, True) with tts.Speak(text, False) in starter
 
Upvote 0
Top