Saturday, February 23, 2013

Android Text to speach library

Android now talks, and so can your apps. Text-to-speech can help you push your app in new directions. 

TTS=Text To Speach Library for Android  -- Comes with 1.6 API Level 4 (Also called speech synthesis)
TTS Engine supports-- English, French, German, Italian and Spanish
General code:- 
The simplest way to do so is to use the speak() method
String myText1 = "Did you sleep well?";
String myText2 = "I hope so, because it's time to wake up.";
mTts.speak(myText1, TextToSpeech.QUEUE_FLUSH, null);
mTts.speak(myText2, TextToSpeech.QUEUE_ADD, null);