I have developed a java application in Netbeans IDE that announces the token numbers using Freetts. My application works perfectly when I ran it(as you know Netbeans adds the library files in a separate folder called 'lib' beside the java application). But Throws Null Pointer Exception When Bundled the libraries Together with the application. Please suggest me some help. Or is there any other free simple speech synthesizers??
Asked
Active
Viewed 304 times
-1
-
Perhaps a manifest file specifying the containing jar contents is required. Does one exist? – Adrian M. Jan 21 '17 at 15:06
-
provide project files and configureation. – Zeeshan Bilal Jan 21 '17 at 15:40
-
Yes! The manifest file is there. I'm a student and practicing real time project development. – Kumar Jan 22 '17 at 16:50
1 Answers
0
Thank you for your suggestions, but I found the answer Myself!
The reason for the deployment problem is because freetts.jar load voiceDirectory at runtime which needs a voices.txt file.When I rebundled it along with my application, this voices.txt file is not included. Hence I used the kal voice package in the following way:
VoiceDirectory vd = new KevinVoiceDirectory();
Voice voices = vd.getVoices();
Voice helloVoice = voices;
helloVoice.allocate();
/*
* Synthesize speech.
*/
helloVoice.speak("Thank you for giving me a voice. "
+ "I'm so glad to say hello to this world.");
/*
* Clean up and leave.
*/
helloVoice.deallocate();
Here I manually load the voices from the voicedirectory class instead from a text file.

Kumar
- 110
- 14