upstream version 1.2.2
[debian/freetts] / demo / JSAPI / Emacspeak / README.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
3 <!--
4
5 /**
6  * Copyright 2001,2003 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 (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 (JSAPI version)</h1>
23                     </td>
24                 </tr>
25             </table>
26         </center>
27
28         <p>This demo implements a JSAPI text-to-speech server that 
29         can be used with Emacspeak. For the non-JSAPI version, please
30         refer to <a href="../../freetts/Emacspeak/README.html">
31         FreeTTS Emacspeak</a>.
32
33         <p><b>NOTE</b>: To build and run this JSAPI demo, you must 
34         <a href="../../../docs/jsapi_setup.html">set up your environment to
35         use JSAPI</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/EmacspeakServer.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
48         <h3>Running the Server</h3>
49         <p>To run this demo, type the following command from a command
50         window at the top level FreeTTS directory:</p>
51         <ul>
52             <p><code>java -jar bin/EmacspeakServer.jar</code></p>
53         </ul>
54
55         <p>This runs the TTS Server at port 2222. To change the port,
56         modify the "port" system property:
57         <ul>
58             <p><code>java -Dport=2222 -jar bin/EmacspeakServer.jar</code></p>
59         </ul>
60
61         <p>The following should appear:
62         <ul>
63             <code>Waiting on ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=2222]</code>
64         </ul>
65
66         <h3>Specifying a Voice</h3> 
67
68         <p>By default, this application will use the "kevin16" voice
69         that comes with the lib/cmu_us_kal.jar file.  You can, however,
70         specify a voice by passing the name of a voice as the
71         first (and only) parameter on the command line:</p>
72         <ul>
73             <p><code>java -jar bin/EmacspeakServer.jar kevin</code>
74             <br><code>java -jar bin/EmacspeakServer.jar kevin16</code>
75             <br><code>java -Dmbrola.base=/usr/local/mbrola -jar
76             bin/EmacspeakServer.jar mbrola_us1</code> (*)</p>
77         </ul>
78     
79         <p>(*) You must <a href="../../../mbrola/README.html">setup
80         and install MBROLA</a> before using MBROLA voices.</p>
81
82         <h3>Specifying Speaking Rate</h3> 
83
84         <p>By default, this application will use the default speaking
85         rate of a voice.  To change the speaking rate, you must
86         specify the voice as the first parameter on the command line
87         (as above) and then specify the speaking rate as the second
88         parameter.  The speaking rate is nominally the words per minute:</p>
89         <ul>
90             <code>java -jar bin/EmacspeakServer.jar kevin16 250</code>
91         </ul>
92     
93         <h3>Connecting to the Server from Emacspeak</h3>
94         <p>In your emacspeak (i.e., emacs with emacspeak running), type the
95         following command:
96         <ul>
97             <code>M-x emacspeak-remote-connect-to-server</code>
98         </ul>
99
100         <p>When you are prompted with "<b>Remote host:</b>", specify the
101         machine the Emacspeak TTS Server is running. The port is 2222
102         by default. Emacspeak should connect to the TTS Server.
103
104         <p>At this point, you should hear "<b>Connecting to server on 
105         host...</b>" at your emacspeak client. You should see the following 
106         on the server-side:
107         <ul>
108 <pre>
109 Waiting on ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=2222]
110 ... new socket connection
111 IN   : tts_set_punctuations all
112 SPEAK:
113 IN   : tts_capitalize 0
114 SPEAK:
115 IN   : tts_allcaps_beep 0
116 SPEAK:
117 IN   : tts_split_caps  1
118 SPEAK:
119 IN   : tts_set_speech_rate 225
120 SPEAK:
121 IN   : tts_set_character_scale 1.25
122 SPEAK:
123 IN   : s
124 IN   : q {Connecting to server on host sunlabs.east  port 2222 }
125 Connecting to server on host sunlabs.east  port 2222
126 SPEAK: "Connecting to server on host sunlabs.east  port 2222"
127 IN   : d
128 SPEAK:
129 IN   : d
130 SPEAK:
131 IN   : tts_set_punctuations some
132 SPEAK:
133 IN   : tts_capitalize 0
134 SPEAK:
135 IN   : tts_allcaps_beep 0
136 SPEAK:
137 IN   : tts_split_caps  1
138 SPEAK:
139 IN   : tts_set_speech_rate 225
140 SPEAK:
141 IN   : tts_set_character_scale 1.25
142 SPEAK:
143 IN   : d
144 SPEAK:
145 </pre>
146         </ul>
147
148         <hr>
149
150         <p>See the <a href="../../../license.terms">license terms</a>
151         and <a href="../../../acknowledgments.txt">acknowledgments</a>.
152         <br>
153         Copyright 2001,2003 Sun Microsystems, Inc.  All Rights
154         Reserved.  Use is subject to license terms.</p>
155     </body>
156 </html>