KTTS - KDE Text-to-Speech System
What is KTTS?
KTTS -- KDE Text-to-Speech -- is a subsystem within the KDE desktop for conversion of text to audible speech. KTTS is currently under development and aims to become the standard subsystem for all KDE applications to provide speech output.
How does it work?
Applications send text they wish spoken to KTTSD via DCOP. For example, in a terminal window, you can type the following commands to start KTTSD and speak "Hello World".
# Start KTTSD (if not already running) kttsd # Send "Hello World" to KTTSD for speaking in English. dcop kttsd KSpeech setText "Hello World" "en" # Speak the text. dcop kttsd KSpeech startText 0
For a complete description of these and other commands, see the KDE Text-to-Speech API.
KTTSD takes care of queuing the speech job and sending the text to the speech synthesis engine. KTTSD is not a speech synthesis engine itself. You must install one of the compatible speech engines listed below. KTTSD is designed with a plugin architecture that makes it easy to write new plugins for other speech engines.
Why? Who needs it?
KTTS provides a common interface for all KDE applications to use for speaking. Programmers need not concern themselves with the details of the particular speech synthesis engine(s) used.
User Features
- Speak any text from the clipboard.
- Speak any plain text file.
- Speak all or any portion of a text file from Kate, including instances where Kate is embedded in another application.
- Speak all or any portion of an HTML page from Konqueror.
- Use as the speech backend for KMouth
- Speak KDE notifications (KNotify).
- Speech is spoken via speech-dispatcher, so any speech-dispatcher backend can be used (espeak, festival, etc.)
- User-configurable filters for substituting misspoken words, choosing speech synthesizers, and transforming XHMTL/XML documents.
Programmer Features
- Priority system for screen reader outputs, warnings and messages, while still playing regular texts.
- 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.
It is hoped that more programmers will begin adding speech capabilities to their KDE programs using KTTS.
KTTS actually consists of several programs:
- KTTSD
- The KDE Text-to-Speech Deamon, a non-gui application that runs in the background, providing TTS support to KDE applications. Applications initiate TTS by making D-Bus calls to kttsd.
- KTTSMGR
- An application for configuring and controlling KTTSD. kttsmgr sits in the system tray.
- kcmkttsd
- A KControl module for configuring the KTTS System. kcmkttsd runs in the KDE Control Center or start it with the command "kcmshell4 kcmkttsd".
- ktexteditor_kttsd
- A plugin for the KDE Advanced Text Editor that permits you to speak an entire text file or any portion of a file.
- libkhtmlkttsdplugin
- A plugin for Konqueror that permits you to speak all or any portion of an HTML web page.
Requirements
- KDE 4.4 or later.
- speech-dispatcher version 0.6.7 or later.
- A speech synthesizer. The following synthesizers and spoken languages are currently supported (this list is not exhaustive.)
| Synthesizer | Languages Supported | Information |
| Festival | American English, British, Spanish, German, Finnish, Czech, Polish, Russian, Italian, French Canadian, Vietnamese, Kiswahili, Zulu, and Ibibio | Festival v1.43 or 1.95beta can be obtained from http://www.cstr.ed.ac.uk/projects/festival/.
Festival is distributed with most Linux distros. Check your distro CDs. Debian users: apt-get install festival festival-voice |
| Espeak | Most languages, check http://espeak.sourceforge.net/languages.html for the current list of supported languages. |
Speech-dispatcher can also use any engine that can be run from a command line.
For additional instructions on downloading and configuring these engines for use in KTTS, see Appendix A of the KTTS Handbook.
Where can I get it?
Version 0.3.5 of KTTS was released concurrently with KDE 3.5. Therefore, the most straight-forward way to obtain KTTS is to install KDE 3.5.x including the kdeaccessibility package. See http://www.kde.org for instructions. It contains the following enhancements:
- Better KNotify event support
- "Rich Speak" conversion of XHTML to SSML
- Support for ALSA and aKode audio output and allow build --without-arts
- Option to autostart KTTSMgr whenever speaking
- Add support for Russian, Hungarian, Kiswahili, Zulu, and Ibibio languages
- Add support for Cepstral commercial voices via Festival
Version 0.3.0 of KTTS was released concurrently with KDE 3.4. Therefore, the most straight-forward way to obtain the older version of KTTS is to install KDE 3.4.x, including the kdeaccessibility package.
KTTS is part of the kdeaccessibility module. You can download the sourcecode for version 0.3.5 using Subversion. See Retrieving the source for instructions. Important note: Obtain version 0.3.5 from /branches/KDE/3.5/kdeaccessibility. Do not download /trunk/KDE/kdeaccessibility as this version is currently being converted to Qt4/KDE4 and is very unstable.
Note that you will need the kdelibs developmental files in order compile KTTS. You should be able to successfully build KTTS against KDE 3.2 or greater developmental files.
Once you have the kdeaccessibility module downloaded, you would build KTTS with the following commands.
cd kdeaccessibility echo kttsd>inst-apps make -f Makefile.cvs ./configure --enable-debug=full --with-akode=check --with-gstreamer=check cd kdeaccessibility/kttsd make make install
As a temporary service to the community, we are making the following SuSE RPMs available for the latest Festival speech engine. Once RPMs are more widely available, these will be removed from ftp.kde.org. Maintained by Jorge Luis Arzola (arzolacub at gmail dot com). These packages work with SuSE 9.2 or SuSE 9.1. They might work with SuSE 9.0, but that has not been tested.
| festival-1.95beta-2.i586.rpm | 7.4 MB | Festival Speech Engine plus American Male voice (kal). |
| festival-1.95beta-2.nosrc.rpm | 8.1 MB | Festival Speech Engine source code plus American Male voice (kal). (see note below) |
md5sum files for the RPMs are also on the ftp site. For additional voices and latest information, see the Festival website.
What documentation is available?
- KTTS Handbook.
- KDE Text-to-Speech API. This is the programmer's API for generating speech from a KDE application using KTTS.
- KTTS README
Too late to get into the Handbook
New Festival Vietnamese Voices
Two diphone Vietnamese voices for the Festival Interactive plugin are available at
http://sourceforge.net/projects/vietnamesevoice
To use these voices, choose Other language when adding a Talker. Choose Vietnamese as the language and Festival Interactive as the plugin. In the Talker Configuration dialog, enter the following settings:
- Voice code: wow_vi_ptn_diphone or wow_vi_liz_diphone
- Character Encoding: UTF-8
The volume and speed may be adjusted, but not pitch.
The Festival Interactive plugin will recognize these voices if you add the following lines to file $KDEDIR/share/apps/kttsd/festivalint/voices
<voice> <code>wow_vi_ptn_diphone</code> <language>vi</language> <codec>UTF-8</codec> <gender>male</gender> <preload>false</preload> <volume-adjustable>true</volume-adjustable> <speed-adjustable>true></speed-adjustable> <pitch-adjustable>false</pitch-adjustable> <name>Vietnamese Male</name> </voice> <voice> <code>wow_vi_liz_diphone</code> <language>vi</language> <codec>UTF-8</codec> <gender>female</gender> <volume-adjustable>true</volume-adjustable> <speed-adjustable>true</speed-adjustable> <pitch-adjustable>false</pitch-adjustable> <name>Vietnamese Female</name> </voice>
Also, so that Vietnamese with show up in the languages pick list, edit file $KDEDIR/share/services/kttsd_festivalintplugin.desktop. To the line that begins with X-KDE-Languages=, add ,vi. Note that you must use a Unicode editor on this file, such as Kate. These changes will be included in a future version of KTTS.
New eSpeak synthesizer
eSpeak is an open source software speech synthesizer for English, and potentially other languages. It includes rudimentary (and probably humourous) attempts at German and Esperanto. More information and downloads at http://espeak.sourceforge.net
eSpeak can be used with the KTTS Command plugin. The following is the recommended configuration:
- Command for speaking text: speak --stdin -w %w
- Character encoding: UTF-8 for English, ISO-8859-1 for German or Esperanto
- Send the data as standard input: checked
IBM TTS
IBM TTS (formerly called ViaVoice) is a commercial synthesizer with very nice voice quality and some languages that are not currently supported by free synthesizers, including French and Brazilian Portugese. More information is available at http://www-306.ibm.com/software/pervasive/tech/demos/tts.shtml and also at http://ibmtts-sdk.sourceforge.net/.
IBM TTS can be used with KTTS via the Command plugin. The following is the recommended configuration:
- Command for speaking text: ttsynth_say -f %w -
- Character encoding: Language dependent. ISO-8859-1 for English.
- Send the data as standard input: checked
Cepstral voices used with Festival
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. The latest versions of KTTS will automatically recognize and configure itself with most of the Cepstral voices when using the Festival plugin.
Hungarian Hadifix voice available
There is a Hungarian voice for Hadifix (mbrola and txt2pho) available at
http://tkltrans.sourceforge.net/
To use the Hungarian voice in KTTS version 0.3.0 (KDE 3.4), proceed as follows:
- Download and install MBROLA binaries from http://tcts.fpms.ac.be/synthesis/mbrola.html. The rest of these instructions assume you unzipped MBROLA to directory /usr/local/mbrola/. Substitute as necessary.
- Download and unzip the Hungarian mbrola voice (hu1) at the MBROLA site. Unzip in the mbrola directory, so when you are finished you should have /usr/local/mbrola/hu1 directory containing file hu1.
- Download and untar the Hungarian Speech Tools (hunpho.tar.gz) from http://tkltrans.sourceforge.net/ into a suitable directory. I used /usr/local/txt2pho.
- Start KTTSMgr (type "kttsmgr" in a Konsole window).
- In the Talkers tab, click Add. Choose Other language and Command synthesizer.
- In the Command Configuration dialog, enter the following for the
Command for speaking texts:
/usr/local/txt2pho/segedeszkozok/txt2pho.sh | /usr/local/mbrola/mbrola-linux-i386 -e /usr/local/mbrola/hu1/hu1 - %w
Note: Although the command above looks like three lines, you should enter it as as single line. Substitute the correct directories where you installed the Hungarian Speech Tools, MBROLA binary, and Hungarian MBROLA voice.
- Choose ISO 8859-2 in the Character encoding box.
- Check the Send the data as standard input box.
- Click OK, then click Apply to save the new Talker.
- Enjoy
If you download and build KTTS from the KDE code repository, you can use the Hadifix plugin instead of the Command plugin. Follow Steps 1 through 4 above. After starting KTTSMgr, in the Talkers tab, click the Add button and choose Hungarian language and Hadifix synthesizer. Click the Edit button and enter the paths to your MBROLA executable and Hungarian Speech Tools txt2pho.sh executable.
How can I contribute to KTTS?
Work on the KDE 3.5.x series of KTTS has stopped, except for non-GUI bug fixes. Work has begun on converting KTTS to KDE4.
KTTS KDE4 Roadmap
The current developers for KTTS are:
- Jeremy Whiting
- Maintainer of KTTS, completed the conversion to KDE4 and speech-dispatcher. (jpwhiting at kde dot org)
- Gary Cramblitt
- Previous maintainer of KTTSD, KTTSMGR, and Festival Interactive plugin. (garycramblitt at comcast dot net)
- Olaf Schmidt
- Maintainer of kate, katepart, and khtml plugins and general KTTS developer. (ojschmidt at kde dot org)
- Gunnar Schmi Dt
- Maintainer of Hadifax and Command plugins and general KTTS developer. (gunnar at schmi-dt dot de)
- Paul Giannaros
- FreeTTS plugin and KTTS developer. (ceruleanblaze at gmail dot com)
- David Powell
- Testing, research, filters
- Jorge Luis Arzola
- Testing, research, RPM packaging, icon creation. (arzolacub at gmail dot com)
The original developer of KTTSD is José Pablo Ezequiel "Pupeno" Fernández
Developmental discussions and support for KTTS take place on the KDE-Accessibility mailing list.
You will sometimes find the developers online in IRC (irc.kde.org channel #kde-accessibility)
This page was last updated on 1 February 2010. Send corrections or comments concerning this page to jpwhiting at kde dot org.
[ Edit ]
KDE Accessibility