Bug 434277

Summary: Provide option to select voice for flite text-to-speech (speak document)
Product: [Applications] okular Reporter: Michael D <nortexoid>
Component: generalAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: wishlist CC: kde.shieling, nate, yurchor
Priority: NOR    
Version First Reported In: 20.12.3   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Michael D 2021-03-11 11:27:46 UTC
The default flite voice is among the worst and hard to listen to. However, other decent voices are available (often packaged by default) and it would be nice to use these. As far as I know, there is no way to set a default voice for flite, and the voice has to be specified as a command argument.
Comment 1 Yuri Chornoivan 2021-03-11 11:49:48 UTC
The current Okular just uses speech-dispatcher for TTS service. It is possible to configure speech-dispatcher via /etc/speech-dispatcher/speechd.conf. Just uncomment

AddModule "flite"        "sd_flite"     "flite.conf"

Then it is possible to choose the voice for flite via /etc/speech-dispatcher/modules/flite.conf:

voice=<voice_name>

Hope it helps a bit.
Comment 2 Michael D 2021-03-11 12:31:44 UTC
Thanks, that's helpful. Unfortunately I can't get speech dispatcher to use anything but the dummy output module as fallback, but that's another issue.
Comment 3 Simplissimus 2022-04-14 21:35:37 UTC
LineageOS, and I guess other "distros" based on AOSP too, uses the TTS system of Google. Is it possible to use them in Okular, and discard speech-dispatcher? Well, I don't know if S-D should be discarded or it could use Googles voices, in any case, would be it possible to use them instead of those "Stephen Hawkins'" ones used currently without infringing some  license or so? I don't think that LineageOS and other popular ROMs are breaking the law when using Google's open sourced technologies, am I right?

If it were possible, TTS in Linux would be finally usable. We lack many decent accessibility solutions. Some people use their web browser and one of those TTS plugins that load documents in the browser and use tolerable voices, but thats just botching.