Code example for TextToSpeech

Methods: speak

0
        } 
    } 
 
    /** 
     * convenient way to just reply with something spoken 
     */ 
    public void speak(String toSay)
    { 
        tts.speak(toSay, TextToSpeech.QUEUE_FLUSH, null);
    } 
 
    /** 
     * add speech, don't flush the speaking queue 
     */ 
    public void addSpeech(String toSay)
    { 
        tts.speak(toSay, TextToSpeech.QUEUE_ADD, null);
    } 
 
    /** 
     * execute the current active {@link VoiceAction} again speaking