Code example for TextToSpeech

Methods: shutdown

0
    } 
    public void shutdownTTS() { 
        Log.i(TAG, "Shutting Down TextToSpeech...");
 
        mSpeakingEngineAvailable = false;
        mTts.shutdown();
        Log.i(TAG, "TextToSpeech Shut Down.");
 
    } 
    public void say(String text) {
        if (mSpeak && mSpeakingEngineAvailable) {
            mTts.speak(text,
                    TextToSpeech.QUEUE_ADD,  // Drop all pending entries in the playback queue.
                    null); 
        } 
    } 
 
    // Implements TextToSpeech.OnInitListener. 
    public void onInit(int status) {
        // status can be either TextToSpeech.SUCCESS or TextToSpeech.ERROR. 
        if (status == TextToSpeech.SUCCESS) {