How to know when TTS is finished?

public class TTSActivity extends Activity implements OnInitListener, OnUtteranceCompletedListener, … { private TextToSpeech mTts; ……….. private void speak(String text) { if(text != null) { HashMap<String, String> myHashAlarm = new HashMap<String, String>(); myHashAlarm.put(TextToSpeech.Engine.KEY_PARAM_STREAM, String.valueOf(AudioManager.STREAM_ALARM)); myHashAlarm.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, “SOME MESSAGE”); mTts.speak(text, TextToSpeech.QUEUE_FLUSH, myHashAlarm); } } // Fired after TTS initialization public void onInit(int status) { if(status == TextToSpeech.SUCCESS) { mTts.setOnUtteranceCompletedListener(this); … Read more

Google Text-To-Speech API

Old answer: Try using this URL: http://translate.google.com/translate_tts?tl=en&q=Hello%20World It will automatically generate a wav file which you can easily get with an HTTP request through any .net programming. Edit: Ohh Google, you thought you could prevent people from using your wonderful service with flimsy http header verification. Here is a solution to get a response in … Read more

Text to speech(TTS)-Android

Text to speech is built into Android 1.6+. Here is a simple example of how to do it. TextToSpeech tts = new TextToSpeech(this, this); tts.setLanguage(Locale.US); tts.speak(“Text to say aloud”, TextToSpeech.QUEUE_ADD, null); More info: http://android-developers.blogspot.com/2009/09/introduction-to-text-to-speech-in.html Here are instructions on how to download sample code from the Android SDK Manager: Launch the Android SDK Manager. a. On … Read more

Text-to-speech (voice generation) and speech-to-text (voice recognition) APIs?

I’ll rehash and update an answer from Speech recognition in C or Java or PHP?. This is by no means comprehensive, but it might be a start for you From watching these questions for few months, I’ve seen most developer choices break down like this: Windows folks – use the System.Speech features of .Net or … Read more