Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Make Your NetBeans RCP Application Talk!

DZone's Guide to

Make Your NetBeans RCP Application Talk!

· Java Zone
Free Resource

Get the Edge with a Professional Java IDE. 30-day free trial.

I know it sounds crazy but it is not. It came up as an idea after getting to know Andreas Stefik and the SodBeans project, which provides accessibility for the blind in the IDE. It's such a huge thing for people like me that have taught blind people to program with almost nothing to work with. I can tell you for sure that SodBeans back then would have made a difference for me and for that student.

Time has passed life changed routes but SodBeans is still stuck in my mind. Then I asked Andreas about using SodBeans for something else and it turned out that the application is so well designed that is modular enough to use it anywhere else. And better yet really easy to use!

Currently I'm working in a personal project Simple Marauroa which is a NetBeans RCP application to use Marauroa, a game engine, in RCP application. This is background work to port my game jWrestling to an RCP application due to some design issues the platform is helping me with.

Marauroa main implementation is Stendahl a MMORPG. Thinking about that, and my plans to make a D20 engine using Marauroa one word came to my mind, Story Telling, well that's actually two...

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

From there you can think about characters, wrestling commentators, and the list goes on. And 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. So you can pass a sentence of a history, some commentator phrases, you name it! And if your application creates those at run time you have an application that can speak without using pre-recorded sounds! Since Phonemic is a plain jar you can use it out of the platform as well.

Then you can think about changing voices and stuff like that, already supported by SodBeans, but that's another article. I'll start playing with that and keep you posted. I'll have this also in the NetBeans Develpers FAQ.

You can read more about Phonemic here.

Get the Java IDE that understands code & makes developing enjoyable. Level up your code with IntelliJ IDEA. Download the free trial.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}