# JSAPI HelloWorld Demo

This demo provides a very simple example of how to use FreeTTS with just the Java Speech API.

NOTE: To build and run this JSAPI demo, you must set up your environment to use JSAPI.

### Building

To build this demo, merely type the following in a shell from any directory in the FreeTTS hierarchy:

`ant -find demo.xml`

Doing so will create `bin/HelloWorld.jar` under the top level directory. You can run the demo using `java -jar` (see "Running" below).

### Running

To run this demo, type the following command from a command window at the top level FreeTTS directory:

`java -jar bin/HelloWorld.jar`

You will hear:

"Hello, world!"

Click AU or WAV to listen to it.

### Specifying a Voice

By default, this application will use the "kevin16" voice that comes with the lib/cmu_us_kal.jar file. You can, however, specify a voice by passing the name of a voice as the first (and only) parameter on the command line:

`java -jar bin/HelloWorld.jar kevin`
`java -jar bin/HelloWorld.jar kevin16`
`java -Dmbrola.base=/usr/local/mbrola -jar bin/HelloWorld.jar mbrola_us1` (*)

(*) You must setup and install MBROLA before using MBROLA voices.

See the license terms and acknowledgments.
Copyright 2001,2003 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.