TTS Reader
TTS Reader
This demo provides an example of how to run a FreeTTS synthesizer as a server on the network: a simple client sends the server some text, and the the server streams back audio. Note that since we use a very simple socket-based protocol for the server, the client can be written in any language (i.e., the client does not have to be written in the JavaTM programming language). People have used this demo as the basis for generating speech output on a wireless PDA.
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/Server.jar and bin/Client.jar under the top level directory. You can run both using java -jar (see "Running" below). We've also provided a simple C client, client.c, which you can compile using the following command: gcc -Wall -lxnet -o cclient client.c
true. This will cause the "time to first byte sent" to client to be printed out for each TTS request: java -Dmetrics=true -jar bin/Server.jar
After running either of the clients, the following prompt should appear:
Receiving : 32886 samples Say :
and you should hear a voice saying "type in what you want me to say." At this point, you should hear what you type in (and press Enter). See the license terms and acknowledgments. Copyright 2001,2003 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.