Android Question TTS only with Internet ?

JTmartins

Active Member
Licensed User
Longtime User
I've been playing with TTS engine and is working as expected in my app.

However it only works when there is an internet connection and by that I mean if internet is on, all the strings are spoken, if internet is off, tablet stays quiet as a dead seagull.

Is this the standard way ?

I'm using Google standard Speech Engine

many thanks

JM
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello JM,

It depends on the model you do use. On some models you can download the offline files required by the TTS engine. Check from your Android's settings (Language and Input) if you can download the necessary files.
 
Upvote 0

JTmartins

Active Member
Licensed User
Longtime User
Thanks Lemonisdead.

I guess they are installed. I can see the Portuguese language and when I select it I have a female voice with 6.1MB and a little trash bin on the right side, so that probably means the voice is installed and I can delete it if I want.

Also in the settings there is an example we can listen to, and that example works without internet connection.

I really did not wanted this to work only with internet access... :(
 
Upvote 0

abhishek007p

Active Member
Licensed User
Longtime User
Basically, Google sends the text to its server and returns a audio which is played. Alternatively it may also trigger a automatic download of TTS engine. Both of these require Internet connection. If there is no Internet then nothing is audible so user complains that your app is not working. so tell the user in advance to either download speech engine for offline use or connect to internet.

You can use this code to open the TTS Settings so user can download the engine quickly.

B4X:
Dim objAction As Intent
objAction.Initialize("com.android.settings.TTS_SETTINGS", "")
StartActivity(objAction)
 
Last edited:
Upvote 0
Top