Code example for TextToSpeech

Methods: shutdown, stop

0
 
    @Stop 
    public void stop() { 
        ttsReady = false;
        if (mTts != null) {
            mTts.stop();
            mTts.shutdown();
        } 
    } 
 
    @Update 
    public void update() { 
        updateFromDictionnary(); 
        setTtsLanguage(lang);
        mTts.shutdown();
    } 
 
    @Port(name = "text") 
    public void triggerText(final Object textMsg) {
        try { 
            mTts.speak(textMsg.toString(),