Code example for TextToSpeech

Methods: setOnUtteranceCompletedListener

0
                public void onStart(String utteranceId) 
                { 
                } 
            }); 
        } 
        else 
        { 
            Log.d(TAG, "set utternace completed listener"); 
            tts.setOnUtteranceCompletedListener(new OnUtteranceCompletedListener() 
            { 
                @Override 
                public void onUtteranceCompleted(String utteranceId)
                { 
                    onDoneSpeaking(utteranceId);
                } 
            }); 
        } 
    } 
 
    /** 
     * external handleReceiveWhatWasHeard must call this