FreeTTS Web Start Clock |
This demo shows how to use FreeTTS with JavaTM Web Start. With Java Web Start, you launch applications simply by clicking on a Web page link. If the application is not present on your computer, Java Web Start automatically downloads all necessary files. It then caches the files on your computer so the application is always ready to be relaunched anytime you want -- either from an icon on your desktop or from the browser link. And no matter which method you use to launch the application, the most current version of the application is always presented to you.
"application/x-java-jnlp-file"
) using the
javaws
executable file in your Java Web Start
directory.
IMPORTANT: Edit the file
clock.jnlp. Change the "<jnlp
codebase="...">"
tag to point to the absolute URL
of this directory, e.g.,
codebase="http://www.yourwebsite.com/FreeTTS/demo/JSAPI/WebStartClock"
.
Unfortunately, the codebase attribute currently cannot be
relative. For more
information, refer to the
Java Web Start FAQ. Moreover, if you use file URLs (e.g.,
"file:/home/usr1/..."), it might not work properly on
differently platforms. So we encourage you to use HTTP
URLs.
If you have created your own voice for the time
domain (see FestVoxToFreeTTS),
you can modify clock.jnlp
to tell it to use your
voice. Merely change the following line in
clock.jnlp
to use the class name of the
VoiceDirectory
for your voice:
<property name="freetts.voices"
value="com.sun.speech.freetts.en.us.cmu_time_awb.AlanVoiceDirectory"/>
Build WebStartClock. If you are not planning on making any changes to WebStartClock, you do not need to rebuild anything. However, if you would like to make changes to WebStartClock and would like to rebuild it, run the following command:
ant -find demo.xml deploy_webstartclock
This will create a WebStartClock.tar file containing all
the files you need to copy to your web server. Note that you
must also unpack jsapi.jar
to build the
WebStartClock. See
how set up your environment to use JSAPI to unpack
jsapi.jar
.
After you have done the "Setup" above, launch the Web Start Clock demo by clicking on this link:
You can also run this demo locally without needing to use Web Start. To run this demo, type the following command from a command window at the top level FreeTTS directory:
java -jar bin/WebStartClock.jar