Code example for TextToSpeech

0
        mPaint = new Paint();
 
        mParams = new HashMap<String, String>();
        mParams.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, TAG);
 
        mTts = new TextToSpeech(context, ttsInitListener);
 
        mOldUtterances = new LinkedList<String>();
        mNewUtterances = new LinkedList<String>();
        mCurrentUtterance = null;
 
        mManualMode = false;
    } 
 
    @Override 
    protected void onDetachedFromWindow() { 
        super.onDetachedFromWindow(); 
 
        mTts.shutdown();
    } 
Connect your IDE to all the code out there  Get Codota for Java