upstream version 1.2.2
[debian/freetts] / demo / freetts / Emacspeak / README.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
3 <!--
4
5 /**
6  * Copyright 2001,2003,2005 Sun Microsystems, Inc.
7  * 
8  * See the file "license.terms" for information on usage and
9  * redistribution of this file, and for a DISCLAIMER OF ALL 
10  * WARRANTIES.
11  */
12
13 -->
14
15 <html>
16     <head><title>Emacspeak Demo (non-JSAPI version)</title></head>
17     <body>
18         <center>
19             <table bgcolor="#FFCC66" width="100%">
20                 <tr>
21                     <td align=center width="100%">
22                         <h1>Emacspeak Demo (non-JSAPI version)</h1>
23                     </td>
24                 </tr>
25             </table>
26         </center>
27
28         <p>This demo implements a text-to-speech server that can be
29         used with Emacspeak. This is the non-JSAPI version, for the
30         JSAPI version, refer to <a
31         href="../../JSAPI/Emacspeak/README.html">JSAPI Emacspeak</a>
32         (If this link doesn't work, it may be because you have the
33         stripped down "JSAPI Free" version of FreeTTS.  To get the
34         full version, go to <a href="http://freetts.sourceforge.net/">
35         http://freetts.sourceforge.net</a>).
36
37         <h3>Building</h3>
38         <p>To build this demo, merely type the following in a shell from
39         any directory in the FreeTTS hierarchy:
40         <ul>
41             <code>ant -find demo.xml</code>
42         </ul>
43         <p>Doing so will create
44         <code>bin/FreeTTSEmacspeakServer.jar</code> under the top level
45         directory.  You can run the demo
46         using <code>java -jar</code> (see "Running the Server" below).
47         This version is sensitive to the existence and location of the
48         <code>lib</code> directory, but allows you to drop new voice
49         jar files into the voice directory and take advantage of them.
50
51         <p>If you want a self-contained version (i.e., one that
52         includes all it needs in one file and doesn't depend upon
53         anything else), you can build the self-contained version by
54         typing the following in a shell at the top level directory
55         in the FreeTTS hierarchy:
56         <ul>
57             <code>ant emacspeak-server</code>
58         </ul>
59         <p>Doing so will create
60         <code>emacspeak-server.jar</code> at the top level.  You can
61         run this server as described below by merely substituting
62         <code>emacspeak-server.jar</code> for 
63         <code>bin/FreeTTSEmacspeakServer.jar</code>.
64
65         <h3>Running the Server</h3>
66         <p>To run this demo, type the following command from a command
67         window at the top level FreeTTS directory:</p>
68         <ul>
69             <p><code>java -jar bin/FreeTTSEmacspeakServer.jar</code></p>
70         </ul>
71
72         <p>This runs the TTS Server at port 2222. To change the port,
73         modify the "port" system property:
74         <ul>
75             <p><code>java -Dport=2222 -jar bin/FreeTTSEmacspeakServer.jar</code></p>
76         </ul>
77
78         <p>The following should appear:
79         <ul>
80             <code>Waiting on ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=2222]</code>
81         </ul>
82
83         <h3>Specifying a Voice</h3> 
84
85         <p>By default, this application will use the "kevin16" voice
86         that comes with the lib/cmu_us_kal.jar file.  You can, however,
87         specify a voice by passing the name of a voice as the
88         first (and only) parameter on the command line:</p>
89         <ul>
90             <p><code>java -jar bin/FreeTTSEmacspeakServer.jar kevin</code>
91             <br><code>java -jar bin/FreeTTSEmacspeakServer.jar kevin16</code>
92             <br><code>java -Dmbrola.base=/usr/local/mbrola -jar
93             bin/FreeTTSEmacspeakServer.jar mbrola_us1</code> (*)</p>
94         </ul>
95     
96         <p>(*) You must <a href="../../../mbrola/README.html">setup
97         and install MBROLA</a> before using MBROLA voices.</p>
98
99         <h3>Specifying Speaking Rate</h3> 
100
101         <p>By default, this application will use the default speaking
102         rate of a voice.  To change the speaking rate, you must
103         specify the voice as the first parameter on the command line
104         (as above) and then specify the speaking rate as the second
105         parameter.  The speaking rate is nominally the words per minute:</p>
106         <ul>
107             <p><code>java -jar bin/FreeTTSEmacspeakServer.jar kevin16 250</code>
108         </ul>
109     
110         <h3>Connecting to the Server from Emacspeak</h3>
111         <p>In your emacspeak (i.e., emacs with emacspeak running), type the
112         following command:
113         <ul>
114             <code>M-x emacspeak-remote-connect-to-server</code>
115         </ul>
116
117         <p>When you are prompted with "<b>Remote host:</b>", specify the
118         machine the Emacspeak TTS Server is running. The port is 2222
119         by default. Emacspeak should connect to the TTS Server.
120
121         <p>At this point, you should hear "<b>Connecting to server on 
122         host...</b>" at your emacspeak client. You should see the following 
123         on the server-side:
124         <ul>
125 <pre>
126 Waiting on ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=2222]
127 IN   : tts_set_punctuations all
128 SPEAK:
129 IN   : tts_capitalize 0
130 SPEAK:
131 IN   : tts_allcaps_beep 0
132 SPEAK:
133 IN   : tts_split_caps  1
134 SPEAK:
135 IN   : tts_set_speech_rate 225
136 SPEAK:
137 IN   : tts_set_character_scale 1.25
138 SPEAK:
139 IN   : s
140 IN   : q {Connecting to server on host sunlabs.east  port 2222 }
141 Connecting to server on host sunlabs.east  port 2222
142 SPEAK: "Connecting to server on host sunlabs.east  port 2222"
143 IN   : d
144 SPEAK:
145 IN   : d
146 SPEAK:
147 IN   : tts_set_punctuations some
148 SPEAK:
149 IN   : tts_capitalize 0
150 SPEAK:
151 IN   : tts_allcaps_beep 0
152 SPEAK:
153 IN   : tts_split_caps  1
154 SPEAK:
155 IN   : tts_set_speech_rate 225
156 SPEAK:
157 IN   : tts_set_character_scale 1.25
158 SPEAK:
159 IN   : d
160 SPEAK:
161 </pre>
162         </ul>
163
164         <hr>
165
166         <p>See the <a href="../../../license.terms">license terms</a>
167         and <a href="../../../acknowledgments.txt">acknowledgments</a>.
168         <br>
169         Copyright 2001,2003,2005 Sun Microsystems, Inc.  All Rights
170         Reserved.  Use is subject to license terms.</p>
171     </body>
172 </html>