KTTSD is the next Proklam.
The first difference is that KTTSD is implemented as a KDED module.
It is based on Proklam and depricates Proklam.

Author: Jos Pablo Ezequiel "Pupeno" Fernndez <pupeno@kde.org>
Current Maintainer: Gary Cramblitt <garycramblitt@comcast.net>
Contributors:
  Olaf Schmidt <ojschmidt@kde.org>
  Gunnar Schmi Dt <gunnar@schmi-dt.de>

KTTSD, KDE Text To Speech Daemon is a plug-in based dcop service that
allows any KDE (or non-KDE) application to send messages using the
dcop interface that later will be spoken.

KTTSD intends to be the implementation for the KDE Speech API.

Features
--------
* Priority system for warnings and messages, while still playing regular texts.
* Long text is parsed into sentences.  User may backup by sentence or paragraph,
  replay, pause, and stop playing.
* Speak contents of clipboard.

Requirements
------------
KDE 3.2.x and a speech synthesis engine, such as Festival.  Festival can be
obtained from http://www.cstr.ed.ac.uk/projects/festival/.  Festival is
distributed with most Linux distros.  Check your distro CDs.  Also works
with Hadifax or any command that can speak text, such as FreeTTS or Festival Lite
(flite).

Support
-------
In addition to the KDE Bugzilla database (bugs.kde.org), discussions for KTTSD
currently take place in the kde-accessibility mailing list.  Subscribe at
https://mail.kde.org/mailman/listinfo/kde-accessibility.  Developers
also hang out in IRC (irc.kde.org channel #kde-accessibility).

Building
--------
If you are building from CVS kdenonbeta module, the usual commands

  cd kdenonbeta
  echo kttsd > inst-apps
  make -f Makefile.cvs
  ./configure
  make
  make install  // as root

Before attempting to run QT Designer against plugin .ui files, first copy
kttsd/libkttsd/pluginconf.h to $KDEDIR/include/.
  
Using
-----
Make sure your speech engine is working.

You may need to grant Festival write access to the audio device.

  chmod a+rw /dev/dsp*

To configure the speech plugin for KTTSD

  kttsmgr
  
If using the Festival or Festival Interactive plugins, you'll need to
specify the path to the voices.  On most systems, this will be

  /usr/share/festival/voices
  
or

  /usr/local/share/festival/voices

Be sure to click the "Default" button after configuring a speech
plugin!

To run KTTSD, check the "Enable Text-to-speech System (KTTSD)" or in a terminal

  kttsd

Click the "Jobs" tab in kttsmgr.  Click "Speak File" button.
Pick a plain text file, then click "Resume" or "Restart" buttons.

To set the text to be spoken

 dcop kttsd kspeech setText <text> <language>

where <text> is the text to be spoken, and <language> is a language code
such as "en", "cy", etc.

Example.

  dcop kttsd kspeech setText "This is a test." "en"

To speak the current text

  dcop kttsd kspeech startText 0

To stop speaking

  dcop kttsd kspeech stopText 0

Depending upon the speech plugin used, speaking may not immediately stop.

17 Mar 2004: The Festival plugin does not work for me.  Crashes as soon
as call to festival_initialize is made.  I suspect that the problem is
incompatible gcc compilers used to compile kttsd and the libfestival.a
static library, which on my system, is version 1.42.  So I added the
Festival (Interactive) plugin that interfaces with Festival interactively
via pipes ("festival --interactive").  If someone can confirm or deny
this, I'd be appreciative.. Gary Cramblitt <garycramblitt@comcast.net>.

Festival (Client/Server), festivalcs, is not currently working.

Using with Festival Lite (flite)
--------------------------------
Obtain Festival Lite here:

  http://www.speech.cs.cmu.edu/flite/index.html
  
Build and install following the instructions in the README that comes
with flite.

Start kttsmgr settings dialog

  kttsmgr
  
Choose the Command plugin and enter the following as the command

  flite -t "%t"

Using with Hadifax (mbrola and txt2pho)
---------------------------------------
 
Hadifax consists of the mbrola diphone to speech synthesizer and txt2pho, a utility for converting
german text to diphones.
 
If you do not already have Hadifax installed, do this:
 
 - Download mbrola binary from
   http://tcts.fpms.ac.be/synthesis/mbrola.html
 - Install mbrola to /usr/local/mbrola directory.
 - Download at least one german language file from the mbrola site.
   Unzip to the /usr/local/mbrola directory.
 - Download txt2pho from
   http://www.ikp.uni-bonn.de/dt/forsch/phonetik/hadifix/HADIFIXforMBROLA.html
 - Unzip txt2pho to /usr/local/txt2pho.
 - Edit txt2phorc file, putting correct data paths in.
 - Either copy txt2phorc to ~/.txt2phorc or to /etc/txt2pho.  Note that you drop the "rc" in file name.
 - In kttsmgr, choose the German language (de), and add Hadifax.  On the properties page configure
   a voice and the paths to mbrola and txt2pho.
 
Compiling the API docs
----------------------
If you are working from the CVS kdenonbeta module, to build the KTTS API
documents using Doxygen, proceed as follows:

Add the following line (if not already present) to kdenonbeta/configure.in.in.

  KDE_INIT_DOXYGEN([The KDE API Reference], [Version $VERSION])

Then do the following commands.

  cd kdenonbeta
  make -f Makefile.cvs
  ./configure
  cd kttsd
  make apidox
  
You should now have the docs in kdenonbeta/apidocs/kttsd.
The KDE Speech API (API used by KDE applications to speak text) is in file
apidocs/kttsd/html/classkspeech.html.

Directories
-----------
libktts            Library for applications desiring to speak text.  This must be built first.
libkttsd           Library for KTTSD.  Defines the interface for plugins for KTTSD.  Must be built second.
plugins            Plugins for KTTSD.  You must have at least one plugin to use KTTSD.
  festival           Plugin for Festival using statically-linked Festival library.  May not work.
  festivalint        Plugin for Festival using Festival Interactive mode (festival --interactive).
  festivalcs         Plugin for Festival using Festival Client/Server mode.  Under development.
  hadifax            Plugin for Hadifax.
  freetts            Plugin for FreeTTS.
  command            Generic command plugin.  Can be used to run Festivl Lite (flite).
kttsd              KTTSD itself.  Non-interactive deamon.
icons              Icon for kttsmgr and KTTSD.
kttsjobmgr         A KPart used by kcmkttsmgr for managing text jobs in KTTSD.
kcmkttsmgr         A KControl module for managing KTTSD.  Run using "kcmshell kcmkttsmgr".
kttsmgr            Application for managing KTTSD.  Wrapper for kcmkttsmgr plus a system tray icon.
kcmkttsd           Old version of KTTSD configuration manager.  A KControl module.  Run using "kcmshell kcmkttsd".
app-plugins        Plugins for other applications to speak text.
  kate-plugin
  katepart-plugin
  khtml-plugin        While viewing an HTML page in Konqueror, highlight some text and choose "Read Out Page"
                      in Tools menu.  Or with nothing highlighted, speaks entire page.

