Emacspeak Demo (JSAPI version) |
This demo implements a JSAPI text-to-speech server that can be used with Emacspeak. For the non-JSAPI version, please refer to FreeTTS Emacspeak.
NOTE: To build and run this JSAPI demo, you must set up your environment to use JSAPI.
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/EmacspeakServer.jar
under the top level
directory. You can run the demo
using java -jar
(see "Running the Server" below).
To run this demo, type the following command from a command window at the top level FreeTTS directory:
java -jar bin/EmacspeakServer.jar
This runs the TTS Server at port 2222. To change the port, modify the "port" system property:
java -Dport=2222 -jar bin/EmacspeakServer.jar
The following should appear:
Waiting on ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=2222]
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/EmacspeakServer.jar kevin
java -jar bin/EmacspeakServer.jar kevin16
java -Dmbrola.base=/usr/local/mbrola -jar
bin/EmacspeakServer.jar mbrola_us1
(*)
(*) You must setup and install MBROLA before using MBROLA voices.
By default, this application will use the default speaking rate of a voice. To change the speaking rate, you must specify the voice as the first parameter on the command line (as above) and then specify the speaking rate as the second parameter. The speaking rate is nominally the words per minute:
java -jar bin/EmacspeakServer.jar kevin16 250
In your emacspeak (i.e., emacs with emacspeak running), type the following command:
M-x emacspeak-remote-connect-to-server
When you are prompted with "Remote host:", specify the machine the Emacspeak TTS Server is running. The port is 2222 by default. Emacspeak should connect to the TTS Server.
At this point, you should hear "Connecting to server on host..." at your emacspeak client. You should see the following on the server-side:
Waiting on ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=2222] ... new socket connection IN : tts_set_punctuations all SPEAK: IN : tts_capitalize 0 SPEAK: IN : tts_allcaps_beep 0 SPEAK: IN : tts_split_caps 1 SPEAK: IN : tts_set_speech_rate 225 SPEAK: IN : tts_set_character_scale 1.25 SPEAK: IN : s IN : q {Connecting to server on host sunlabs.east port 2222 } Connecting to server on host sunlabs.east port 2222 SPEAK: "Connecting to server on host sunlabs.east port 2222" IN : d SPEAK: IN : d SPEAK: IN : tts_set_punctuations some SPEAK: IN : tts_capitalize 0 SPEAK: IN : tts_allcaps_beep 0 SPEAK: IN : tts_split_caps 1 SPEAK: IN : tts_set_speech_rate 225 SPEAK: IN : tts_set_character_scale 1.25 SPEAK: IN : d SPEAK:
See the license terms
and acknowledgments.
Copyright 2001,2003 Sun Microsystems, Inc. All Rights
Reserved. Use is subject to license terms.