Android Question TTS only with Internet ?

Discussion in 'Android Questions' started by JTmartins, May 20, 2015.

  1. JTmartins

    JTmartins Active Member Licensed 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
     
  2. lemonisdead

    lemonisdead Well-Known Member Licensed 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.
     
    Johan Schoeman and tdocs2 like this.
  3. JTmartins

    JTmartins Active Member Licensed 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... :(
     
  4. JTmartins

    JTmartins Active Member Licensed User

    Sudenly without any reason...it started to work with and without Internet access...

    Don't know why...but I'm happy now :)
     
    lemonisdead likes this.
  5. abhishek007p

    abhishek007p Active Member Licensed 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.

    Code:
    Dim objAction As Intent
    objAction.Initialize(
    "com.android.settings.TTS_SETTINGS""")
    StartActivity(objAction)
     
    Last edited: May 21, 2015
    Roberto Tsolakis and JTmartins like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice