Revision as of 18:13, 19 September 2011 by Javydreamercsw (Talk | contribs)

First add a dependency to Phonemic, the library that does the magic, which is conveniently wrapped within the SodBeans modules. Here's the update center for SodBeans.

The only thing you need is two lines of code:

TextToSpeech speech = TextToSpeechFactory.getDefaultTextToSpeech();
speech.speak("Hello, World!");

This call also already handles making your calls thread safe and is efficient enough to handle thousands of TTS "requests" in rapid succession.

And your application talks. Since Phonemic is a plain jar you can use it out of the platform as well.

You can read more about Phonemic here.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo