Ubuntu – add a commandline synthesis engine to jovie (text to speech for KDE)

kdetext to speech

I want to be able to read out aloud PDFs in Ubuntu. I currently use the Okular PDF reader. After installing Jovie, I was able to read out aloud my PDFs in Okular. However, I find the the speech quality of the current synthesis engine (espeech) to be terrible, and nowhere close to the quality of text to speech engine on my android phone.

I installed that synthesis engine of android (libttspico-utils). Now I'm stuck at trying to make Jovie aware of libttspico-utils. The Jovie handbook (section A.2) says "It (Jovie) also works with any synthesis engine that can be run from a command in a Konsole.", but doesn't explain how to do this — which is my question here. I know that libttspico-utils can be invoked over commandline.

Best Answer

After some investigations, I found a way for that using command line. If Jovie is working correctly with espeak and libttspico-utils is installed.

on konsole type

~$ spd-conf

and answer the default answer for each question. This will create a conf file in ~/.config/speech-dispatcher/speechd.conf

edit this file and uncomment the line containing "pico-generic"

...
#AddModule "ibmtts"       "sd_ibmtts"    "ibmtts.conf"
#AddModule "cicero"        "sd_cicero"     "cicero.conf"
 AddModule "pico-generic" "sd_generic"     "pico-generic.conf"

 # DO NOT REMOVE the following line unless you have
 # a specific reason -- this is the fallback output module
 # that is only used when no other modules are in use
 #AddModule "dummy"         "sd_dummy"      ""
...

Then edit the file ~/.kde/share/config/kttsdrc, and change the outputModule of your talker from espeak to pico-generic

[Talkers]
Sam=<voice name="Sam" lang="en" outputModule="pico-generic" voiceName="" voiceType="1"><prosody volume="0" rate="0" pitch="0" /></voice>

Check that speech-dispatcher is in user mode, by checking the file /etc/defaults/speech-dispatcher it should say:

RUN=no

To be sure, restart the computer.

The first time I used TTS, I got an DBUS error message, but after it is working fine.

Hope it will help.

Related Question