The requirements:
=================

You will need these components to compile Speech Dispatcher:  
 - glib 2.0  (http://www.gtk.org)
 - libdotconf 1.0 (http://www.azzit.de/dotconf/)
 - pthreads
 - libasound1 (0.5.8) 
 - gcc and GNU make (http://www.gnu.org)
 - flite [we use it for sound track output] (http://cmuflite.org/)
 - festival-freebsoft-utils 0.3+ (http://www.freebsoft.org/festival-freebsoft-utils)

Only if you are building from CVS, you also need these:
 - automake 1.7+, autoconf, pkg-config and libtool

We recommend to also install these packages:
 - festival (http://www.cstr.ed.ac.uk/projects/festival/)

Building Speech Dispatcher:
===========================

If you want to use Speech Dispatcher with Festival (recommended), you
also need to install festival-freebsoft-utils version 0.3 or higher!
There is a new key feature -- SSML support -- in Speech Dispatcher and
the Festival output module *won't* work with the old
festival-freebsoft-utils. See above for where to get them.

To compile the whole project, including Speech Dispatcher server, all modules
and clients, simply extract the distribution archive and change to 
speech-dispatcher-<version> directory and run "make all" command as follows:

 $ tar -xzvf speech-dispatcher-@VERSION.tar.gz
 $ cd speech-dispatcher-@VERSION

But before typing make all, make sure that you have correctly installed flite!
You should have configured flite with
    ./configure --enable-shared
to be able to use the flite plug-in. If you aren't sure if you have done this,
check for example for libflite_cmu_us_kal.so in your library directory.
(It's also possible to use Speech Dispatcher with Flite static libraries,
but it is generally not a good way unless you know what you are doing.)

Before running make, you have to set the environment variable SED
to your binary of the sed application. This is usually done as:

$ export SED=sed

$ make all

If it doesn't work, try the following:

 $ cd speech-dispatcher-@VERSION
 $ aclocal && autoconf && autoheader && automake -a && automake
 $ ./configure
 $ make

(You can use ./build.sh instead of the auto-toolchain) 

If everything worked ok, you can install all the parts to the default
path by running (as root):

 $ make install


Installing Festival Speech Dispatcher interface:
================================================

You need to install the new version of festival-freebsoft-utils (0.3
or higher).

Please make sure that Festival server_access_list configuration
variable and your /etc/hosts.conf are set properly. server_access_list
must contain the symbolic name of your machine and this name must be
defined in /etc/hosts.conf and point to your IP address. You can test
if this is set correctly by trying to connect to the port Festival
server is running on via an ordinary telnet. If you are not rejected,
it probably works.

Testing
=======

You can try to execute Speech Dispatcher by
 $ speech-dispatcher

If Speech Dispatcher is running, you can test if it's working by:
 (on some other console)
 $ cd speech-dispatcher-@VERSION/src/tests
 $ ./run_test basic.test
(You can also try other tests, if you like.)

Also try
 $ speech-dispatcher --help
to see how you can run it as a standalone program and possibly see
what's wrong.

Troubleshooting
===============

If you think something is missing, try additionally:

 $ mkdir PREFIX/etc/speech-dispatcher
 $ cp -r config PREFIX/etc/speech-dispatcher
 $ mkdir PREFIX/include
 $ cp clients/libspeechd.h PREFIX/include/

where PREFIX is your installation path prefix (defaulting to /usr/local).

Building in more detail:
========================

The hierarchy of Makefiles is used to build each of the parts. The top
level Makefile allows you to compile some extra parts of the project.
These are:

    - doc ........ build documentation in all supported formats
                   (see doc/README for more information)
    - src/server ..... build speachd server - this is the same as
                   cd src/server; make all
    - src/modules .... build all speachd modules - this is the same as
                   cd src/modules; make all
    - src/clients .... build all clients - this is the same as
                   cd src/clients; make all
    - clean ...... remove all files except the sources (does not
                   clean documentation)
    - all ........ build server, modules and clients

    
