2

I use pulseaudio on my system. I have installed the tts applications espeak and flite. Both of which work perfectly when called from the commandline, but fail to work when called via spd-say. I need them to work via spd-say, because I want to configure a TTS engine for Okular.

Here is the output for sudo systemctl status speech-dispatcherd.service

● speech-dispatcherd.service - Speech-Dispatcher an high-level device independent layer for speech synthesis.
   Loaded: loaded (/usr/lib/systemd/system/speech-dispatcherd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2019-01-18 00:30:18 IST; 2min 9s ago
  Process: 1067 ExecStart=/usr/bin/speech-dispatcher -d (code=exited, status=1/FAILURE)

Jan 18 00:30:18 archlinux-hostname systemd[1]: Starting Speech-Dispatcher an high-level device independent layer for speech synthesis....
Jan 18 00:30:18 archlinux-hostname speech-dispatcher[1067]: [Fri Jan 18 00:30:18 2019 : 363344] speechd: Speech Dispatcher 0.8.8 starting
Jan 18 00:30:18 archlinux-hostname systemd[1]: speech-dispatcherd.service: Control process exited, code=exited, status=1/FAILURE
Jan 18 00:30:18 archlinux-hostname systemd[1]: speech-dispatcherd.service: Failed with result 'exit-code'.
Jan 18 00:30:18 archlinux-hostname systemd[1]: Failed to start Speech-Dispatcher an high-level device independent layer for speech synthesis..

Here is the output for journalctl -xe

➜ journalctl -xe

Jan 18 00:30:18 archlinux-hostname sudo[1064]:       codingcoffee : TTY=pts/1 ; PWD=/home/codingcoffee ; USER=root ; COMMAND=/usr/bin/systemctl restart speech-dispatcherd.service
Jan 18 00:30:18 archlinux-hostname sudo[1064]: pam_unix(sudo:session): session opened for user root by codingcoffee(uid=0)
Jan 18 00:30:18 archlinux-hostname systemd[1]: Starting Speech-Dispatcher an high-level device independent layer for speech synthesis....
-- Subject: A start job for unit speech-dispatcherd.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit speech-dispatcherd.service has begun execution.
-- 
-- The job identifier is 4254.
Jan 18 00:30:18 archlinux-hostname speech-dispatcher[1067]: [Fri Jan 18 00:30:18 2019 : 363344] speechd: Speech Dispatcher 0.8.8 starting
Jan 18 00:30:18 archlinux-hostname systemd[1]: speech-dispatcherd.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- An ExecStart= process belonging to unit speech-dispatcherd.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Jan 18 00:30:18 archlinux-hostname systemd[1]: speech-dispatcherd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The unit speech-dispatcherd.service has entered the 'failed' state with result 'exit-code'.
Jan 18 00:30:18 archlinux-hostname systemd[1]: Failed to start Speech-Dispatcher an high-level device independent layer for speech synthesis..
-- Subject: A start job for unit speech-dispatcherd.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit speech-dispatcherd.service has finished with a failure.
-- 
-- The job identifier is 4254 and the job result is failed.
Jan 18 00:30:18 archlinux-hostname audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=speech-dispatcherd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=fail>
Jan 18 00:30:18 archlinux-hostname kernel: audit: type=1130 audit(1547751618.383:189): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=speech-dispatcherd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=>
Jan 18 00:30:18 archlinux-hostname sudo[1064]: pam_unix(sudo:session): session closed for user root
Jan 18 00:30:19 archlinux-hostname sudo[1124]:       codingcoffee : TTY=pts/1 ; PWD=/home/codingcoffee ; USER=root ; COMMAND=/usr/bin/systemctl status speech-dispatcherd.service
Jan 18 00:30:19 archlinux-hostname sudo[1124]: pam_unix(sudo:session): session opened for user root by codingcoffee(uid=0)
Jan 18 00:30:19 archlinux-hostname sudo[1124]: pam_unix(sudo:session): session closed for user root

Here is the output to my speech-dispatcher config file ~/.config/speech-dispatcher/speechd.conf

LogLevel  3
LogDir  "default"
DefaultRate   0
DefaultPitch   0  
DefaultVolume 100
DefaultLanguage   en
AudioOutputMethod   pulse
DefaultModule   espeak
Include "clients/*.conf"
0
  • Maybe the following link can help you work around the problem.

    The “Speak Text” feature in Okular is not working. How do I get it to work?

  • It is important that Okular sees text, not a [scanned] image for all these text-to-speak tools to work. Have you checked that there is text in your pdf files (that you can copy and paste text)?

  • I have no own experience of spd-say, let us hope that someone who knows it can help you with the configuration.

| improve this answer | |
  • Hey, thanks for the answer, but it doesn't solve my problem. It's a rather tedious work around. Regarding the PDF containing text, yes, I'm pretty sure it has text in it, and is not an image. Also the problem doesn't lie with Okular. It lies with speech-dispatcher. The CLIs for espeak and flite also work perfectly. So if I get speech-dispatcher (which, the way I understand it, is nothing but a wrapper over the TTS engine) to work perfectly, I'm sure I'll be able to use TTS in Okular via kmouth. – codingCoffee Jan 17 '19 at 21:21
  • @codingCoffee, I see. and I hope hat someone who knows about spd-say can help you with the configuration. – sudodus Jan 18 '19 at 5:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.