Text to speech service delay


Last Updated:

  1. cmasmas

    cmasmas Member This Topic's Starter

    Joined:
    Mar 13, 2010
    Messages:
    15
    Likes Received:
    1
    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

    Joined:
    Sep 18, 2010
    Messages:
    1
    Likes Received:
    0
    Have you found anything on this? I am having the same problems
     
  3. cmasmas

    cmasmas Member This Topic's Starter

    Joined:
    Mar 13, 2010
    Messages:
    15
    Likes Received:
    1
    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...