# The &kmyapplication; Handbook

Gary
R.
Cramblitt
garycramblitt@comcast.net
2004
Gary R. Cramblitt
&FDLNotice;
2004-12-02
1.02.00

&kmyapplication; - the KDE Text-to-Speech system - is a plugin based service that allows any KDE (or non-KDE) application to speak using the DCOP interface.

&kmyapplication; intends to be the implementation for the KDE Text-to-Speech API (KSAPI).

KDE
accessibility
kdeaccessibility
TTS
Text-to-Speech
KTTSD
kttsmgr
festival
flite
hadifix
MBROLA
freetts
epos
SSML

## Introduction

&kmyapplication; is a subsysem within KDE for producing Text-to-Speech (TTS). It provides a common API for KDE programmers to give TTS capabilities to their applications. It provides some nice capabilities for end users as well.

User features:

- Speak contents of a text file.

- Speak KDE notification events (KNotify).

- Speak all or part of the text of a web page in Konqueror.

- Speak all or part of the text in Kate text editor, including instances where Kate is embedded in another KDE application.

- Long text is parsed into sentences. User may backup by sentence or paragraph, replay, pause, and stop playing.

- Audio output via aRts or GStreamer (version 0.8.7 or later)

Programmer features:

- Priority system for screen reader outputs, warnings and messages, while still playing regular texts.

- Plugin-based architecture for support of a wide variety of speech synthesis engines and drivers.

- Permit generation of speech from the command line (or via shell scripts) using the KDE DCOP utilities.

- Provide a lightweight and easily usable interface for applications to generate speech output.

- Applications need not be concerned about contention over the speech device.

- FUTURE: Provide support for speech markup languages, such as VoiceXML, Sable, Java Speech Markup Language (JSML), and Speech Markup Meta-language (SMML).

- FUTURE: Provide limited support for embedded speech markers.

- Asynchronous to prevent system blocking.

&kmyapplication; actually consists of several programs:

`kttsd`

  the KDE Text-to-Speech Deamon, which is a non-GUI application that provides TTS services to applications via DCOP.

`kttsmgr`

  a GUI application for configuring and controlling kttsd. kttsmgr sits in the system tray.

`libkhtmlkttsdplugin`

  A plugin for the Konqueror web browser that permits you to speak all or a portion of the text on a web page.

`katekttsdplugin`

  A plugin for the Kate text editor that permits you to speak all or a portion of a text file.

### Support

In addition to the KDE Bugzilla database ( http://bugs.kde.org/ ), discussions for &kmyapplication; 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).

## Using &kmyapplication;

Before you can use &kmyapplication;, you must install at least one speech synthesis engine and make sure it is working. See .

### Starting `kttsmgr`

To start the &kmyapplication; system, type the following command in a Konsole

`kttsmgr`

or click on &kmyapplication; in the KDE Menu.

If this is the first time running `kttsmgr`, or if you have not yet configured any Talkers, the Talkers screen appears. See . If you have already configured at least one Talker, the General screen appears. See .

### Selecting Synthesis Plugins (Talkers)

When you click the Talkers tab in `kttsmgr`, the Talkers screen appears.

The KDE Text-to-Speech Manager (Languages tab). The KDE Text-to-Speech Manager (Talkers tab)

Click to add a new Talker, which is a speech synthesis plugin.

All the configured Talkers are listed here. Highest priority Talkers are listed at the top. The top-most Talker will be used to do the speaking when an application does not specify a Talker.

Click on a Talker in the list to highlight it and click this button to remove it.

Click on a Talker in the list to highlight it and click this button to display the synthesis plugin's configuration dialog.

Click on a Talker in the list to highlight it and click this button to move it down one row in the list. The lower a Talker appears in the list, the lower its priority.

Click one of these buttons to apply the changes you have made to the running &kmyapplication; system.

When you click the Add button, the Add Talker screen appears.

Add Talker screen. Add Talker screen

You can select a speech synthesis plugin by either Synthesizer name, or by the Language the synthesizer can speak. Check the radio button next to the corresponding box. When the Language radio button is checked, the Language box displays all the languages supported by all available synthesizers, and the Synthesizer box displays only those synthesizers that support the chosen language. When the Synthesizer radio button is checked, the Synthesizer box displays all available synthesizers, and the Language box displays only the languages supported by the chosen synthesizer.

Choose the language and synthesizer plugin here.

When you click here, most synthesizer plugins will automatically configure themselves, choosing a default setup. A new Talker will appear in the list on the Talkers tab. Click the Edit button to display or edit the Talker's configuration. See

You must configure at least one Talker and click the Apply or OK buttons before you can start the &kmyapplication; system and begin speaking text. To start the &kmyapplication; system, click the General tab and check the Enable Text-to-Speech System (KTTSD) box. see .

### Configuring Synthesis Plugins (Talkers)

When you click the Add button on the Talkers tab and add a Talker, or click the Edit button, the Talker Configuration screen appears. Each speech synthesis plugin has a different Talker Configuration screen. The following is an example for configuring the Festival Interactive plugin. For specifics for each kind of plugin, see

Talker Configuration Talker Configuration

Specify the path to the Festival executable program. If Festival is in your PATH environment variable, just enter `festival`.

Click to scan for available voices.

Select a voice.

Click to test. You should hear a test sentence spoken.

Use these controls to set the volume, talking speed, and pitch (tone) of the synthesized speech.

Some voices, such as the MultiSyn voices, are so large that they require several seconds to load. Checking this box will cause them to be loaded when KTTSD is started, thereby saving time (at the expense of using more memory) before the first sentence is synthesized.

Click the OK button to save the Talker configuration settings.

Be sure to click the Apply button, otherwise your changes will not take effect in the running &kmyapplication; system.

Assuming the test worked, you are almost ready to begin using &kmyapplication;. Now go back to the General tab and check the Enable Text-to-Speech System (KTTSD) box. This will start the KDE TTS Deamon. See . You may now begin using &kmyapplication; to speak text. Click the Jobs tab to create and manage text jobs. See .

### Starting KTTSD and Setting General Options

Once you have configured at least one Talker, you can start the KDE Text-to-Speech System. Click on the General tab. The General screen appears. You can also set some general options on this screen.

The KDE Text-to-Speech Manager (General tab). The KDE Text-to-Speech Manager (General tab)

Check this box to activate the &kmyapplication; system. This starts the KDE TTS Deamon (KTTSD). If KTTSD starts successfully, the Jobs tab will appear. Once KTTSD has been started, you can begin creating and speaking text jobs. See . Unchecking will stop KTTSD and deactivate the KDE TTS system.

If this box is disabled, you have not yet configured any Talkers (or you forgot to click the Apply button). See .

Check this box to speak KDE notifications. See for more information.

When this box is checked, an icon appears in the system tray whenever `kttsmgr` is running. In this mode, clicking OK or Cancel does not cause `kttsmgr` to exit. Instead, the screen disappears but `kttsmgr` continues running in the system tray. Click the icon to restore the screen. To quit `kttsmgr`, right-click on the icon in the system tray and choose Quit. When unchecked, an icon does not appear in the system tray. Clicking OK or Cancel quits `kttsmgr`.

When `kttsmgr` exits, &kmyapplication; keeps running if the Enable Text-to-Speech System (KTTSD) box is checked.

This option does not take effect until the next time `kttsmgr` is started.

This option has no effect when `kttsmgr` is running in the KDE Control Center.

When this box is checked, the `kttsmgr` screen appears when you start `kttsmgr`. If unchecked, the `kttsmgr` icon appears in the system tray when `kttsmgr` is started, but the screen does not appear. Click the icon in the system tray to make the screen appear.

### Managing Text Jobs

When you click the Jobs tab in `kttsmgr`, the Jobs screen appears.

The KDE Text-to-Speech Manager (Jobs tab). The KDE Text-to-Speech Manager (Jobs tab)

The buttons on this toolbar permit you to start, delete, and pause text jobs. Select a job in the list below, then click one of these buttons.

The buttons on this toolbar permit you to advance or rewind by sentence within the job selected in the list below. (Not all jobs have multiple parts.)

The buttons on this toolbar permit you to speak the text currently in the KDE clipboard, or open a text file for speaking. You can also refresh the list of text jobs.

The currently-speaking sentence appears here. If you need to, you can resize this panel by dragging the divider up or down.

When you click OK, all changes to settings on other screens are applied (if any) and `kttsmgr` minimizes to the system tray. Click on the icon in the system tray to restore the screen.

The Jobs tab only appears when KTTSD is running. If you do not see the Jobs tab, click on the General tab and check the Enable Text-to-Speech (KTTSD) box.

### Audio Settings

When you click the Audio tab in `kttsmgr`, the Audio screen appears.

The KDE Text-to-Speech Manager (Audio tab). The KDE Text-to-Speech Manager (Audio tab)

Select the method of audio output here. If GStreamer is grayed, either &kmyapplication; was compiled without GStreamer support, or &kmyapplication; was unable to load the necessary GStreamer libraries.

If GStreamer is selected for audio output, choose the GStreamer audio sink method here. If no sinks are listed, you need to install at least one. See .

Adjust the speed of talking here. 50% is approximately twice as slow as normal while 200% is approximately twice as fast.

Be sure to click Apply to apply the new settings to the running &kmyapplication; system.

There are two ways to adjust the speed of speech in &kmyapplication;. Many of the Talkers have a Speed setting in their configuration dialogs, which you can display by clicking Edit on the Talkers screen. This Speed setting on the Audio screen is in addition to the Talker speed setting and generally can be used even if the Talker does not support a speed setting. For this speed setting to work, you must have the `sox` utility installed on your system (Debian users: `apt-get install sox`). Also, this speed setting is ignored when speaking text containing SSML. (See )

### Text Interruption Settings

When you click the Interruption tab in `kttsmgr`, the Interruption screen appears.

The KDE Text-to-Speech Manager (Interruption tab). The KDE Text-to-Speech Manager (Interruption tab)

This screen permits you to specify special actions to be taken whenever a text job is interrupted by another, higher priority, message. There are four kinds of speech jobs that &kmyapplication; handles:

- Regular text.

- Messages.

- Warnings.

- Screen Reader Output.

Screen Reader Output has the highest priority. It is reserved for use by Screen Reader applications. Screen Reader Output preempts all other messages, causing those jobs to pause. Once the Screen Reader Output has been spoken, the preempted jobs will automatically resume.

Warnings are the next highest priority. It is reserved for high-priority messages, such as "CPU is over-heating." A Warning will preempt Messages and regular text, causing those jobs to pause. Once the Warning has been spoken, the preempted jobs will automatically resume.

Messages are the next highest priority. A Message will preempt regular text jobs. KMouth is an example of an application that uses Messages. For example, while reading out long text from a web page, KMouth can be used to greet someone who walks into the room.

All four kinds of jobs are queues, except for Screen Reader Output. If a Screen Reader Output is sent from an application while &kmyapplication; is speaking another Screen Reader Output, the speaking message is stopped and discarded.

When a text job is interrupted by a Message, Warning, or Screen Reader Output, &kmyapplication; will add the audio outputs on this screen to the stream.

This message is spoken whenever a regular text job is interrupted.

This audio file is sounded whenever a regular text job is interrupted. If both a Pre-sound and a Pre-message are specified, the Pre-sound is sounded before the Pre-message.

This message is spoken whenever an interrupted text job resumes.

This audio file is sounded whenever an interrupted text job resumes. It is sounded last.

The settings on this screen apply only to regular text jobs. Messages, Warnings, and Screen Reader Outputs have no special actions when they are preempted by a higher-priority message.

### Speaking Text from Web Pages

While running the KDE Konqueror web browser, you can speak the text of the web page displayed. First ensure that &kmyapplication; is running. Highlight the text you want spoken and choose Tools Speak Text on the main menu. After a moment, the highlighted text should begin speaking.

It is almost always a good idea to highlight the text on the web page you want spoken. You can skip this step, but you will hear a lot of HTML headers and other invisible tags spoken.

### Speaking Text from Kate Text Editor

While running the KDE Advanced Text Editor (Kate), you can speak the text displayed. First ensure that &kmyapplication; is running. Highlight the text you want spoken and choose Tools Speak Text on the main menu. After a moment, the highlighted text should begin speaking.

You do not have to first highlight text. In this case, the entire file will be spoken.

This also works when Kate is running embedded in another application, such as Konqueror or Quanta.

### Speaking Notifications (KNotify)

KNotify is the notification subsystem within KDE, which alerts you to events you configure within the KDE system. You can configure &kmyapplication; to speak text notifications.

For example, Konversation, a KDE IRC application, permits you to configure a wide variety of notifications. For instance, you can tell Konversation to notify you whenever a message appears in an IRC channel with your nickname in it. Together with &kmyapplication; you can have KDE speak the text of the IRC message to you.

In general, if a KDE application supports KNotify, a Notifications menu item will appear under the Settings menu. The specifics for configuring each application with KNotify vary from application to application.

To enable &kmyapplication; to speak KNotify text notifications, start `kttsmgr`, click the General tab, and check the Speak notifications (KNotify) box. Then click the Apply button.

### SSML

The Speech Synthesis Markup Language (SSML) is a W3C standard for marking up text for speech output. It provides tags for controlling voices, rate of speech, volume, gender, and pitch (tone). It also provides tags for controlling how words are spoken, for instance spelling out abbreviations. SSML is part of the VoiceXML specification, which is also a W3C standard.

At this time, &kmyapplication; provides limited and very basic support for SSML. It currently has the following restrictions.

- Works only with the Festival Interactive and Hadifix Talkers.

- You must install the `rab_diphone` (British male) voice, as this is the default voice Festival uses when speaking SSML.

- The Speed setting on the Audio screen is ignored when speaking text containing SSML.

- You cannot rewind or advance by sentences within text containing SSML in the Jobs screen.

- If the Speed or Pitch settings in the Festival configuration dialog are not set to 100%, it will usually cause the SSML text to be spoken in a monotone.

The following sample text can be used to experiment with SSML.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE speak PUBLIC "-//W3C//DTD SYNTHESIS 1.0//EN"
        "http://www.w3.org/TR/speech-synthesis/synthesis.dtd">

    <speak version="1.0" xml:lang="en-US">
        <prosody pitch="low">
            Who's been sleeping in my bed?
        </prosody>
        said papa bear.
        <prosody pitch="medium">
            Who's been sleeping in my bed?
        </prosody>
        said momma bear.
        <prosody pitch="high">
            Who's been sleeping in my bed?
        </prosody>
        said baby bear.
    </speak>

More robust support for SSML is planned for the next version of &kmyapplication;.

## Command Reference

TODO

## Developer's Guide to &kmyapplication;

&kmyapplication; has two Application Programmer Interfaces (APIs):

- The KDE Text-to-Speech API, which is used by application programmers to give their applications TTS capabilities. Applications communicate with KTTSD via DCOP.

- The KTTSD Plugin API, which is used to add speech synthesis plugins to KTTSD so that &kmyapplication; will work with a new speech synthesis engine.

The following section gives a short description of the KDE Text-to-Speech API DCOP Interface. Full documentation for both APIs is available online at the KDE Accessibility web site (http://accessibility.kde.org).

### The &kmyapplication; DCOP Interface

Applications communicate requests for Text-to-Speech services via the KDE DCOP interface to program `kttsd` object `kspeech`.

Enter the following commands in a Konsole.

If KTTSD is not already running

`kttsd`

To queue a text job to be spoken

`dcop kttsd kspeech setText "text" "talker"`

where `text` is the text to be spoken, and `talker` is a language code such as `en`, `cy`, etc. This command does not speak the text; instead it queues a text job for speaking.

Example.

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

To speak the last queued text job

`dcop kttsd kspeech startText 0`

In this case, `0` refers to the last text job queued. You may also specify a specific job number. (If no job number is given, a `0` is required.)

To stop the currently speaking text job

`dcop kttsd kspeech stopText 0`

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

There are many more commands that can be sent. To see a list of possible commands,

`dcop kttsd kspeech`

or read the KDE Text-to-Speech API online.

## Questions and Answers

&reporting.bugs; &updating.documentation;

I need to start over. How do I get &kmyapplication; completely terminated?

Enter the following commands in a Konsole:

    killall kttsd
    killall kttsmgr

How can I see debugging output from `kttsd`?

Open two Konsole windows. First start `kttsd` in one window, then start `kttsmgr` in the second.

I have an additional Festival voice I downloaded from the Internet. I installed it, and I can use it in Festival, but it does not show up in `kttsmgr`.

Edit file `$KDEHOME/share/apps/kttsd/festivalint/voices` to add the new voice. The other entries can be used as a guide. If you successfully add a voice, please send a patch to the developers along with the URL from which you obtained the voice file.

None of the supported speech synthesizers support the language I need. Where can I get a synth for my language?

Google(tm) is your friend. This link might also help. If you find a free synthesis engine that supports your desired language, and want to add support for it to &kmyapplication;, please contact the development team. Open source engines are especially welcome. If you know of a commercial synth, perhaps you can pursuade the vendor to donate a free copy to the &kmyapplication; development team. In the meantime, you may be able to get the synth working using the Command plugin. See

## Credits and License

&kmyapplication;

Program Copyright © 2002 José Pablo Ezequiel "Pupeno" Fernández pupeno@kde.org

Current Maintainer: Gary Cramblitt garycramblitt@comcast.net

Contributors:

- Olaf Schmidt ojschmidt@kde.org

- Gunnar Schmi Dt gunnar@schmi-dt.de

- Paul Giannaros ceruleanblaze@gmail.com

Documentation Copyright © 2004 Gary R. Cramblitt garycramblitt@comcast.net

&underFDL;

&underGPL;

Speech synthesis engines used by &kmyapplication; have their own licenses. See each engine's documentation or website for details.

## Installation

### How to obtain &kmyapplication;

FUTURE &install.intro.documentation;

(FUTURE) Debian Install Command: `apt-get install kdeaccessibility`

As of 2 Dec 2004, &kmyapplication; has not yet been moved into the kdeaccessibility package. We expect to do this very soon. In the meantime, you will find links to source and binary packages on the KDE Accessibility web site (http://accessibility.kde.org).

If you have access to KDE CVS, you can download &kmyapplication; by checking out the `kdenonbeta` module. &kmyapplication; will be found in the `kttsd` directory. You can also download a nightly tarball of all kdenonbeta from ftp://ftp.kde.org/pub/kde/unstable/latest/kdenonbeta.tar.bz2

### Requirements

Mandatory requirements:

- KDE version 3.2 or later.

- A speech synthesis engine. The following engines and spoken languages are currently supported.

  Festival | American English, British, Spanish, German, Finnish, Czech
  Festival Lite (flite) | English
  Hadifix (MBROLA and txt2pho) | German
  Epos | Czech, Slovak
  FreeTTS | English

  It also works with any synthesis engine that can be run from a command in a Konsole.

  The languages listed above may not be comprehensive or up-to-date. Check the specifications for each engine for a complete list of supported languages.

  &kmyapplication; uses a flexible plugin architecture for speech synthesis engines. If you want to enhance &kmyapplication; to support another engine, contact the development team.

  See for specific instructions for each of these engines.

Optional components:

- The `sox` audio utility is needed for adjusting overall speech speed, but not required. Debian users can install sox with the command `apt-get install sox`. Sox is included on most &Linux; distribution CDs.

- The `xsltproc` utility is needed for SSML support, but not required. Debian users can install xsltproc with the command `apt-get install xsltproc`.

- GStreamer version 0.8.7 or later. By default, &kmyapplication; uses aRts for audio output, but if you install GStreamer, you can use it instead. You can obtain GStreamer from

  http://gstreamer.freedesktop.org/

  As of December 2004, Debian Testing users can install GStreamer for use with &kmyapplication; using the following commands, but check the GStreamer website for the latest information.

      apt-get install libgstreamer0.8-0
      apt-get install gstreamer0.8-misc
      apt-get install gstreamer0.8-tools
      apt-get install gstreamer0.8-oss
      apt-get install gstreamer0.8-alsa
      apt-get install libgstreamer-plugins0.8-0
      apt-get install libgstreamer-plugins0.8-0-dev
      apt-get install libgstreamer0.8-dev

### Compilation and Installation

If you downloaded &kmyapplication; as a tarball, log in as a normal user and untar the tarball to a suitable directory, change to that directory, and enter the following commands.

    ./configure
    make

By default, the commands above will install &kmyapplication; to `/opt/kde3`. If this directory is not in your `$KDEDIRS` path, you may need to add a `--prefix=target` option. For example,

    ./configure --prefix=/usr/local
    make

On Debian systems, `/usr/local` is the usual place to install applications compiled from source code.

Login as root and install the compiled &kmyapplication; using the following commands.

    su
    make install

If you downloaded the &kmyapplication; source from the `kdenonbeta` CVS module, or downloaded the nightly CVS tarball, use the following commands to compile and install.

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

If you are working from the CVS kdenonbeta module and wish 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 (the API used by KDE applications to speak text) is in file `apidocs/kttsd/html/classkspeech.html`. The KTTSD Plugin API (the API used by KTTSD to interface with its plugins) is in file `apidocs/kttsd/html/classPlugInProc.html`.

### Configuration

Make sure your speech synthesis engine is working before using &kmyapplication;. Follow the instructions that came with the engine.

In some cases, you may need to grant write access to the audio device.

`chmod a+rw /dev/dsp*`

#### Using with Festival (Interactive)

Festival is one of the better free and open source TTS engines available. Voice quality is generally good and there are quite a few languages and voices supported. For many voices, you can control the volume, speed of the generated speech, and pitch (tone) from &kmyapplication;.

Synthesizer Name: Festival Interactive

URL: http://www.cstr.ed.ac.uk/projects/festival/

Debian Install Command: `apt-get install festival`

You will need to install at least one language. Follow the instructions that come with Festival.

Additional English festival voices are available from

http://hts.ics.nitech.ac.jp/.

Additional Spanish, English, and German voices are available from

http://cslu.cse.ogi.edu/tts/download/. You must compile an additional module for these voices, therefore, you must have the Festival source code. The German voices have limited distribution.

A Finnish male voice is available from

http://www.ling.helsinki.fi/suopuhe/download/.

Festival is typically included with &Linux; distributions. Check your distro CDs to see if it is included.

Start `kttsmgr`. On the Talkers screen, click the Add button. Choose Festival Interactive and a Language. If the Configure Talker screen does not appear, click the Edit button. If the Festival executable program is not in your PATH, enter the full path to the executable. Click the Rescan button, pick a voice, and click the Test button. You should hear a test sentence spoken.

##### Using Festival with MBROLA

Festival can be used in combination with the MBROLA synthesizer. In this mode, Festival does the lexical analysis and MBROLA produces the audio. The MBROLA binary and MBROLA voice files can be downloaded from

http://festvox.org/mbrola/.

Follow the instructions in the `readme.txt` that comes with the download.

Note that MBROLA is not a complete Text-to-Speech system. MBROLA synthesizes speech from diphone files. You must have additional software that can produce the diphones. When combined with Festival, Festival produces the diphones needed by MBROLA. `txt2pho` can also be used to produce diphones from German text. See Using with Hadifix for more information.

There are three methods of combining Festival with MBROLA.

- MBROLA Wrappers. At the time of writing this Handbook, this method is limited to English voices.

- IMS German Festival.

- Festival-Czech.

###### Using Festival with MBROLA Wrappers

In this method, additional wrapper code is added to Festival to enable speech synthesis using MBROLA voice files. Note that the MBROLA voice files are not installed in the MBROLA directory tree. Instead, they are installed in the `festival/lib/` directory tree. For instructions, see

http://www.cstr.ed.ac.uk/projects/festival/mbrola.html

###### Using IMS German Festival

IMS German Festival is a modified version of Festival that uses German MBROLA voices. It works with either Festival version 1.4.1 or Festival 2.0 (1.95beta). First install Festival and MBROLA, if you have not already done so. Next, download IMS German Festival, from

http://www.ims.uni-stuttgart.de/phonetik/synthesis/festival_opensource.html.

Follow the instructions in the `README` that comes with the download. (Note, if using in combination with Festival 2.0, it is not necessary to apply the `fixes` tarball, but you must still rebuild festival.) Finally, add the following lines to the `festival/lib/siteinit.scm` file.

    (voice-location "german_de1_os" "/usr/local/mbrola/de1"
      "German Female, IMS Festival de1")
    (voice-location "german_de2_os" "/usr/local/mbrola/de2"
      "German Male, IMS Festival de2")
    (voice-location "german_de3_os" "/usr/local/mbrola/de3"
      "German Female, IMS Festival de3")

just above the line that reads

    (provide 'siteinit)

(On some systems, the file you edit is `/etc/festival.scm`). Only add the lines that correspond to the German voices you have installed. Substitute the correct path for `/usr/local/mbrola/` . Also note that (at the time of this writing) IMS German Festival does not work with the de4, de5, or de6 German voices.

###### Using Festival-Czech

This method uses some special code to enable speech synthesis using Festival with an MBROLA Czech voice. To install, first download and install Festival and MBROLA and make sure both are working. Next, download Festival-Czech from

http://www.freebsoft.org/festival-czech

In the following procedures substitute the correct directory paths as needed.

Untar the download to a suitable directory and make the lexicon. The Festival executable must be in your PATH.

    cd /usr/local
    tar xvfz festival-czech.tar.gz
    cd festival-czech
    make

Download the `cz2` voice file from the MBROLA website, and unzip it in the MBROLA directory.

    cd /usr/local/mbrola
    mkdir cz2
    cd cz2
    unzip cz2-001009.zip

Add the following lines to the `festival/lib/siteinit.scm` file.

    (set! czech-lexicon-file "/usr/local/festival-czech/czech-lexicon.out")
    (set! load-path (cons "/usr/local/festival-czech" load-path))
    (require 'czech)
    (set! czech-mbrola_database "/usr/local/mbrola/cz2/cz2")
    (set! mbrola_progname "/usr/local/mbrola/mbrola")
    (voice-location "czech_mbrola_cz2" "/usr/local/mbrola/cz2"
        "Czech Male, MBROLA")
    (require 'czech-mbrola)

just above the line that reads

    (provide 'siteinit)

(On some systems, the file you edit is `/etc/festival.scm`).

#### Using with Festival Lite (flite)

Festival Lite is a free open source engine that currently supports a limited number of voices and languages. It is light weight, but sacrifices voice quality somewhat. You cannot control the pitch, volume, or speed of this engine from &kmyapplication;.

Synthesizer Name: Festival Lite (flite)

URL: http://www.speech.cs.cmu.edu/flite/index.html

Debian Install Command: `apt-get install flite`

flite is typically included with &Linux; distributions. Check your distro CDs to see if it is included.

Build and install flite following the instructions in the `README` that comes with it.

#### Using with Hadifix (MBROLA and txt2pho)

Hadifix is a two-stage synthesis engine based on diphones. The `txt2pho` utility converts text into diphones and the `MBROLA` engine synthesizes the diphones to sound. Voice quality is good, but language support is currently somewhat limited. You can control the voice, pitch, speed, and volume from `kttsmgr`.

Synthesizer Name: Hadifix

URL: see below

Debian Install Command: none

If you do not already have Hadifix installed, do this:

1. Download MBROLA binary from http://festvox.org/mbrola/.

2. Install MBROLA to `/usr/local/mbrola` directory.

3. Download at least one german language file from the MBROLA site. Unzip to the `/usr/local/mbrola` directory.

4. Download txt2pho from

   http://www.ikp.uni-bonn.de/dt/forsch/phonetik/hadifix/HADIFIXforMBROLA.html.

5. Unzip txt2pho to `/usr/local/txt2pho`.

6. Edit `txt2phorc` file, putting correct data paths in.

7. Either copy `txt2phorc` to `~/.txt2phorc` or to `/etc/txt2pho`. Note that you drop the "rc" in file name.

8. In `kttsmgr`, choose the German language (de), and add Hadifix.

9. On the Configure Talker screen, configure a voice and the paths to MBROLA and txt2pho.

10. Click the Test button to test.

#### Using with Epos

Epos is a free Czeck and Slovak open source engine. It is light weight, but sacrifices voice quality somewhat. You cannot control the volume of this engine from &kmyapplication;.

Synthesizer Name: Epos TTS Synthesis System

URL: http://epos.ure.cas.cz/

Debian Install Command: `apt-get install epos`

Start `kttsmgr`. On the Talkers tab, click the Add button. Choose Czeck or Slovak language and Epos TTS Synthesis System. If the epos server executable and client are not in your PATH, specify the paths to these executables in the Configure Talker screen. The options boxes permit you to pass additional options to the server and client. In a konsole, type `epos -h` or `say -h` for information.

#### Using with FreeTTS

FreeTTS is a free open source speech engine written in Java(tm), which means that you must have the Java Virtual Machine software installed on your system to use it. It currently has limited voice and language support. You cannot control the pitch, volume, or speed of this engine from &kmyapplication;.

Synthesizer Name: FreeTTS

URL: http://sourceforge.net/projects/freetts/

Debian Install Command: none

#### Using the Command Plugin

The command plugin permits you to use &kmyapplication; with any speech synthesis engine that can be run as a command in a Konsole.

Synthesizer Name: Command

URL: none

Debian Install Command: none

Ideally, you should use a command that synthesizes to a temporary audio (wav) file, rather than send the speech directly to the audio device.

&documentation.index;