Configuration
Prev

Configuration

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

Tip

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 best 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 KTTS.

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. If you will be speaking web pages, you must install the rab_diphone (British Male) voice.

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/.

A Polish male voice is available from

http://www.artegence.com/download/voicexml/speech/festival_polish_voice.tgz.

A Russian male voice is available from

http://nshmyrev.narod.ru/festival/festival.html

You must have Festival 1.95 beta or later to use this voice. The voice is still in early development. Untar to festival/lib/voices/russian/. When you configure the Russian talker, the voice code is msu_ru_nsh_diphone. Be sure to select an 8-bit cryllic encoding, such as KOI8-R.

Italian voices for Festival 1.95 beta are available at

http://www.csrf.pd.cnr.it/TTS/It-FESTIVAL-download.htm.

If you get CRC errors when you unzip, try downloading again.

Kiswahili, Zulu, and Ibibio voices for Festival 1.95 beta are available at

http://www.llsti.org/.

Unfortunately, the Hindi voice also available there will not work with KTTS.

Commercial voices, including a French Canadian voice, can be purchased from Cepstral, LLC at

http://www.cepstral.com/

The FAQ on their Support page has information about using their voices in Festival.

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

Note

When using the Polish, Hungarian, or Czech languages, be sure the Encoding option is set to ISO 8859-2.

When using the Russian voice, be sure the Encoding option is set to an 8-bit cryllic encoding, such as KOI8-R.

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 the section called “Using with Hadifix (MBROLA and txt2pho)” for more information.

There are three methods of combining Festival with MBROLA.

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 folder tree. Instead, they are installed in the festival/lib/ folder 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

Note

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

Untar the download to a suitable folder 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 folder.

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 KTTS.

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 folder.

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

  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.

A Hungarian implementation for MBROLA and txt2pho is available at

http://tkltrans.sourceforge.net/.

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 KTTS.

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™, 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 KTTS.

Synthesizer Name: FreeTTS

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

Debian Install Command: none

Using the Command Plugin

The command plugin permits you to use KTTS 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.

If the speech synthesis engine requires text to be encoded differently from your desktop encoding setting, you must use the %f parameter to pass the text to the engine. KTTS will encode the text in the setting you specify when it writes the text to the temporary file. If you attempt to pass text on the command line using the %t parameter, it will be encoded using your desktop locale setting. You can also use the Send the data as standard input option to solve this problem, if the engine accepts input from StdIn. For example, here is a sample command to send polish text to Festival using ISO 8859-2 encoding and removing unspeakable punctuation characters.

cat %f | tr '(){}[]"' ' ' | festival --tts --language polish

Prev
Home


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team