How to get more voices for QTextToSpeech?

  • Hi! I'm playing with the Hello Speak Example on Ubuntu 16.04. I installed Qt 5.9.1 and the flite backend / Qt flite plugin from Ubuntu's repositories. So far, so good, the example works but it only gives me "English (UnitedStates)" for the language and "kal16 - Male - Adult" for the voice. Does anybody know what packages I need to install to get more voices? A single English female voice would already be sufficient.

    BTW, when I enter flite -lv in the terminal, it says Voices available: kal awb_time kal16 awb rms slt. And flite -voice slt -t "Hello" actually speaks with the slt voice.

    P.S.: Actually the OS is KDE Neon, which is basically just some extra repos on top of Ubuntu. Not sure if that makes any difference, just saying.

  • Moderators

    First of all i don't have any experience with QtSpeech module yet.

    But AFAIK the used backend on Linux is speech-dispatcher and not flite.

  • @raven-worx I don't have any experience with TTS either, also I can't find much info about the current infrastructure on Linux, resp. on KDE. I have installed speech-dispatcher. And I can make it speak in the terminal, using its own spd-say command. I'm not sure how speech-dispatcher and flite are related. I think speech-dispacher is an abstraction layer / daemon, and flite is one of several "engines" it can use.

    spd-say --list-output-modules says:


    The following packages that seem to be relevant have been installed:

    • speech-dispatcher
    • libspeechd2
    • flite
    • libflite1
    • speech-dispatcher-flite
    • libqt5texttospeech5
    • libqt5texttospeech5-dev
    • qtspeech5-flite-plugin

    Note that no qtspeech5-speechdispatcher-plugin (or similar) exists in the repo. But looking at the Qt Speech sources, it seems there should be such a plugin.

    Anyways, when I build an application for testing ....

    • QTextToSpeech::availableEngines() returns "flite"
    • availableLocales() gives "en_US"
    • and availableVoices() says "kal16".