1. Check out our companion app, Forums for Android! Download from Google Play

Text to speech service delay

Discussion in 'Application Development' started by cmasmas, Jul 10, 2010.

  1. cmasmas

    cmasmas Member
    Thread Starter
    16

    Mar 13, 2010
    15
    1
    16
    Hi everyone,

    I'm making use of TTS on a application. The point is that it takes a few seconds to start up TTS service, and the voice comes with a delay. Is there a way to avoid this delay, or to make the Activity wait until TTS is ready?
    Thanks for the info!
     

    Advertisement

  2. gpsTrainer

    gpsTrainer New Member
    5

    Sep 18, 2010
    1
    0
    5
    Have you found anything on this? I am having the same problems
     
  3. cmasmas

    cmasmas Member
    Thread Starter
    16

    Mar 13, 2010
    15
    1
    16
    Hi!!

    I found a way so the application waits until tts finishes to "speak".
    Here is the code:

    public void speak(String s)
    {
    mTts.speak(s, TextToSpeech.QUEUE_ADD, null);
    while (mTts.isSpeaking())
    {}
    }

    Hope it helps.
     

Share This Page

Loading...