I'm building a web application using HTML and JSP. One of the functionality which provided is converting some texts to speech. In netbeans, I created a Java project, this project contains a Java applet offers the speech task, this applet uses FreeTTS (external JAR file), and it works fine. So after building this project, I added its JAR to the web project, for embedding the applet within the web. Now, the problem the applet doesn't work from the website, but it works standalone. Please I need your help to fix this issue.
Asked
Active
Viewed 465 times
1 Answers
2
The FreeTTS developers recommend against using it in an applet, and suggest deploying it via Web Start instead. If it does indeed work fine standalone, that should fix your problem.
If you can't use Web Start, you could consider moving the audio generation to the server and running FreeTTS there.

Wander Nauta
- 18,832
- 1
- 45
- 62
-
Hi Wander, I've tried this approach, I build a normal Java application while I'm trying run it as a Java web start, I always receive an error pointing to the speak method which has been imported from the FreeTTS project. I don't get the idea from your suggestion "audio generation", could you please provide further explanation – Mohannad Nov 03 '13 at 14:35
-
[Here](http://freetts.sourceforge.net/demo/JSAPI/WebStartClock/README.html) are some instructions for setting up Java Web Start with FreeTTS, maybe those are useful for you. W.r.t. my second suggestion: if you can move FreeTTS to the box running the JSP's, you don't have to send the FreeTTS applet to your users. Just call FreeTTS on the server, have the server store the speech audio in a file (like [here](http://stackoverflow.com/questions/4027853/how-can-i-store-output-voice-to-an-audio-file-in-freetts)), then send that audio to your users. – Wander Nauta Nov 03 '13 at 14:50
-
Thanks Wander, but I've tried the instructions for the web clock, and doesn't work properly. For the 2nd part, I don't want to send any file to the users, just I wanna them hear some details then confirm or deny it using buttons. – Mohannad Nov 03 '13 at 14:56