Code example for TextToSpeech

Methods: playSilencespeak

0
		String amPm = c.get(Calendar.AM_PM) == Calendar.AM ? "am" : "pm";
		StringBuffer sbSay = new StringBuffer();
		sbSay.append(String.valueOf(hour)).append(" ")
				.append(String.valueOf(min)).append("   ").append(amPm);
		 
		talker.speak("The time now is"+sbSay.toString(), TextToSpeech.QUEUE_ADD, null);
		talker.playSilence(1000, TextToSpeech.QUEUE_ADD, null);
		talker.speak("Please walk 20 steps to silence the alarm", TextToSpeech.QUEUE_ADD, null);
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE