Getting JSAPI setup to work using freetts seems to be quite difficult as seen by here, here, here…..
Turns out the install instructions were incomplete. The instructions were:
1. Go to the FreeTTS/lib directory
2. Type .\jsapi.exe
3. If the binary license agreement is acceptable, accept
it by clicking “I Agree”. The jsapi.jar file will be unpacked
and deposited into the lib directory.
What you actually want to do is:
- Download FreeTTS
- Unzip the freeTTS binary package and check inside the \lib directory for jsapi.exe
- Run Jsapi.exe, say yes, to unpack jsapi.jar
- Find your JRE directory, mine was C:\Program Files\Java\jdk1.6.0_03\jre\lib\ext
- Copy all the Jars (jsapi.jar, freetts.jar, cmu_time_awb.jar, cmu_us_kal.jar, etc.) to that directory
- Check in netbeans your projects properties ie right click on project->properties->libraries->manage platforms and the jars should be listed there. If they are not, restart and hopefully they should now be there.
- Copy speech.properties to the relevant folder. To find out where this is run the HelloWorld example that comes with FreeTTS. In my case the file was located in C:\Documents and Settings\Username\java.home\lib and contained the following
1 2 3 4 5
# Modify this accordingly... # #TextSynthEngineCentral=com.sun.speech.engine.synthesis.text.TextEngineCentral # FreeTTSSynthEngineCentral=com.sun.speech.freetts.jsapi.FreeTTSEngineCentral
Or you can set the property using
Any problems, post here and I will try to help you out.