Make sure your speech synthesis engine is working before using KTTS. 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*
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
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
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
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.
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
.
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
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.
MBROLA Wrappers. At the time of writing this Handbook, this method is limited to English voices.
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
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
.
Also note that (at the time of this writing)
IMS German Festival does not work with the de4, de5, or de6 German voices./usr/local/mbrola/
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 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
.
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.
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:
Download MBROLA binary from http://festvox.org/mbrola/.
Install MBROLA to /usr/local/mbrola
folder.
Download at least one german language file from the MBROLA site.
Unzip to the /usr/local/mbrola
folder.
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 Hadifix.
On the Configure Talker screen, configure a voice and the paths to MBROLA and txt2pho.
Click the button to test.
A Hungarian implementation for MBROLA and txt2pho is available at
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
Debian Install Command: apt-get install epos
Start kttsmgr. On the Talkers tab,
click the 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.
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
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
Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team