Jovie (previously called ktts in KDE <= 4.4) -- is a subsystem within the KDE desktop for conversion of text to audible speech. Jovie is currently under development and aims to become the standard subsystem for all KDE applications to provide speech output.
Applications send text they wish spoken to Jovie via D-Bus. For example, in a terminal window, you can type the following commands to start Jovie and speak "Hello World".
# Start Jovie (if not already running) jovie # Send "Hello World" to KTTSD for speaking in English. qdbus org.kde.KSpeech /KSpeech say "Hello World" 0
The above example shows how to play with speech via command-line, but to use it inside your application you'll likely want to use the dbus interface programmatically. It's defined in kdelibs/interfaces/kspeech/org.kde.KSpeech.xml and can be used in your application by putting the following in your CMakeLists.txt:
Then in the source file you want to use speech in, #include <kspeech.h> to get some of the enumerations needed (i.e. KSpeech::soPlainText). Finally, define an object of type org::kde::KSpeech* and use it like so:
org::kde::KSpeech* kspeech = new org::kde::Kspeech("org.kde.kttsd", "/KSpeech", QDBusConnection::sessionBus()); kspeech->setApplicationName("myappname"); kspeech->say("text to speak", KSpeech::soPlainText);
For a complete description of these and other commands, see the KDE Text-to-Speech API.
Jovie takes care of sending the text to speech-dispatcher. Jovie is not a speech synthesis engine itself. You must install one of the compatible speech engines. Speech-dispatcher is designed with a plugin architecture that makes it easy to write new plugins for other speech engines.
Jovie 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.
It is hoped that more programmers will begin adding speech capabilities to their KDE programs using Jovie.
Jovie actually consists of a few programs:
The KDE Text-to-Speech system, a system tray application that provides TTS support to KDE applications. Applications initiate TTS by making D-Bus calls to Jovie.
A KControl module for configuring the Text to Speech System. kcmkttsd runs in the KDE Control Center or start it with the command "kcmshell4 kcmkttsd" or by choosing "configure" from Jovie system tray icon's menu.
A plugin for the KDE Advanced Text Editor that permits you to speak an entire text file or any portion of a file.
A plugin for Konqueror that permits you to speak all or any portion of an HTML web page.