Code example for TextToSpeech

Methods: shutdown, sleep, stop, synthesizeToFile

0
		String destFileName = f.getPath() + "/" + newfname + ".wav";
		Fileto = newfname;
		myHashRender.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID,
				therap);
		// mTts.addSpeech(therap, f.getPath() + "/" + fname + ".wav"); 
		mTts.synthesizeToFile(therap, myHashRender, destFileName);
		try { 
			Thread.sleep(5000);
			return new File(destFileName);
		} catch (Exception e) {
			return null; 
		} finally { 
			mTts.stop();
			mTts.shutdown();
		} 
 
	} 
 
	@Override 
	public void onInit(int status) {