1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
/**
* Copyright 2001,2003 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and
* redistribution of this file, and for a DISCLAIMER OF ALL
* WARRANTIES.
*/
-->
<html>
<head><title>JSAPI HelloWorld Demo</title></head>
<body>
<center>
<table bgcolor="#FFCC66" width="100%">
<tr>
<td align=center width="100%">
<h1>JSAPI HelloWorld Demo</h1>
</td>
</tr>
</table>
</center>
<p>This demo provides a very simple example of how to use
FreeTTS with just the Java Speech API.</p>
<p><b>NOTE</b>: To build and run this JSAPI demo, you must
<a href="../../../docs/jsapi_setup.html">set up your environment to
use JSAPI</a>.
<h3>Building</h3>
<p>To build this demo, merely type the following in a shell from
any directory in the FreeTTS hierarchy:
<ul>
<code>ant -find demo.xml</code>
</ul>
<p>Doing so will create
<code>bin/HelloWorld.jar</code> under the top level
directory. You can run the demo
using <code>java -jar</code> (see "Running" below).
<h3>Running</h3>
<p>To run this demo, type the following command from a command
window at the top level FreeTTS directory:</p>
<ul>
<p><code>java -jar bin/HelloWorld.jar</code></p>
</ul>
<p>You will hear:</p>
<ul>
<p><b>"Hello, world!"</b></p>
<p><img src="../../../docs/images/speaker1.gif"> Click
<a href="helloworld.au">AU</a> or
<a href="helloworld.wav">WAV</a> to listen to it.</p>
</ul>
<h3>Specifying a Voice</h3>
<p>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:</p>
<ul>
<p><code>java -jar bin/HelloWorld.jar kevin</code>
<br><code>java -jar bin/HelloWorld.jar kevin16</code>
<br><code>java -Dmbrola.base=/usr/local/mbrola -jar
bin/HelloWorld.jar mbrola_us1</code> (*)</p>
</ul>
<p>(*) You must <a href="../../../mbrola/README.html">setup
and install MBROLA</a> before using MBROLA voices.</p>
<hr>
<p>See the <a href="../../../license.terms">license terms</a>
and <a href="../../../acknowledgments.txt">acknowledgments</a>.
<br>
Copyright 2001,2003 Sun Microsystems, Inc. All Rights
Reserved. Use is subject to license terms.</p>
</body>
</html>
|