You are not logged in.

#1 2019-01-18 06:56:19

coding_coffee
Member
Registered: 2018-01-14
Posts: 4

[SOLVED] Speech Dispatcher failing to start

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. When I run diagnostics for speech-dispatcher, pulseaudio also seems to be working fine, generating the tone. However I'm not able to figure out the reason why spd-say is not working.

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`

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: [url]https://lists.freedesktop.org/mailman/listinfo/systemd-devel[/url]
-- 
-- 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: [url]https://lists.freedesktop.org/mailman/listinfo/systemd-devel[/url]
-- 
-- 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: [url]https://lists.freedesktop.org/mailman/listinfo/systemd-devel[/url]
-- 
-- 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: [url]https://lists.freedesktop.org/mailman/listinfo/systemd-devel[/url]
-- 
-- 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"

Last edited by coding_coffee (2019-01-20 07:22:52)

Offline

#2 2019-01-18 07:01:06

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Speech Dispatcher failing to start

Please use code tags, not markdown, when pasting to the boards: https://wiki.archlinux.org/index.php/Co … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-01-18 07:54:25

coding_coffee
Member
Registered: 2018-01-14
Posts: 4

Re: [SOLVED] Speech Dispatcher failing to start

My bad! Added code tags.

Last edited by coding_coffee (2019-01-18 07:55:07)

Offline

#4 2019-01-18 08:27:20

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,743

Re: [SOLVED] Speech Dispatcher failing to start

From what I'm gathering spd-say should be able to be invoked standalone, do you get any errors from it? FWIW if you want to use the dispatcher daemon for this, you will probably want to set up that service as a systemd user service instead of using the system one.

Last edited by V1del (2019-01-18 08:29:30)

Offline

#5 2019-01-18 23:13:06

TCBear
Member
Registered: 2016-01-22
Posts: 34

Re: [SOLVED] Speech Dispatcher failing to start

A couple of suggestions.
First, configure speech-dispatcher with spd-conf. You can find documentation of speech-dispatcher on-line.
Second, as far as I have found, speech-dispatcher only works with espeak-ng as of the last update without venturing into AUR packages. You will probably need to install it, which will replace espeak.
That should get spd-say working. Connecting it to an app is a whole other ball of wax.

Offline

#6 2019-01-19 03:18:53

coding_coffee
Member
Registered: 2018-01-14
Posts: 4

Re: [SOLVED] Speech Dispatcher failing to start

Alright so,

1. When I use the command

spd-say "speak this out loud"

It does give me a success response, but nothing is ever spoken out.

2. As V1del pointed out, I also made speech-dispatcher into a user systemd service instead of a system service. Now, it does start, however it goes back to inactive mode after 2 - 3 seconds. Also, even if it is started and active, spd-say doesn't work, although it returns a success response

codingcoffee in ~ at archlinux-hostname 
➜ systemctl --user status speech-dispatcherd.service
● speech-dispatcherd.service - Speech-Dispatcher an high-level device independent layer for speech synthesis.
   Loaded: loaded (/home/codingcoffee/.config/systemd/user/speech-dispatcherd.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2019-01-19 08:23:41 IST; 15s ago
  Process: 3016 ExecStart=/usr/bin/speech-dispatcher -d (code=exited, status=0/SUCCESS)

Jan 19 08:23:36 archlinux-hostname systemd[828]: Starting Speech-Dispatcher an high-level device independent layer for speech synthesis....
Jan 19 08:23:36 archlinux-hostname speech-dispatcher[3016]: [Sat Jan 19 08:23:36 2019 : 119420] speechd: Speech Dispatcher 0.8.8 starting
Jan 19 08:23:36 archlinux-hostname systemd[828]: Started Speech-Dispatcher an high-level device independent layer for speech synthesis..
Jan 19 08:23:41 archlinux-hostname systemd[828]: speech-dispatcherd.service: Succeeded.

codingcoffee in ~ at archlinux-hostname 
➜ systemctl --user start speech-dispatcherd.service && spd-say "hi"

codingcoffee in ~ at archlinux-hostname 
➜ systemctl --user status speech-dispatcherd.service               
● speech-dispatcherd.service - Speech-Dispatcher an high-level device independent layer for speech synthesis.
   Loaded: loaded (/home/codingcoffee/.config/systemd/user/speech-dispatcherd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-01-19 08:23:59 IST; 4s ago
  Process: 3241 ExecStart=/usr/bin/speech-dispatcher -d (code=exited, status=0/SUCCESS)
   CGroup: /user.slice/user-1000.slice/user@1000.service/speech-dispatcherd.service
           ├─3242 /usr/lib/speech-dispatcher-modules/sd_dummy /home/codingcoffee/.config/speech-dispatcher/modules/dummy.conf
           ├─3245 /usr/lib/speech-dispatcher-modules/sd_generic /home/codingcoffee/.config/speech-dispatcher/modules/generic.conf
           ├─3249 /usr/lib/speech-dispatcher-modules/sd_espeak-ng /home/codingcoffee/.config/speech-dispatcher/modules/espeak-ng.conf
           └─3255 /usr/bin/speech-dispatcher -d

Jan 19 08:23:59 archlinux-hostname systemd[828]: Starting Speech-Dispatcher an high-level device independent layer for speech synthesis....
Jan 19 08:23:59 archlinux-hostname speech-dispatcher[3241]: [Sat Jan 19 08:23:59 2019 : 613105] speechd: Speech Dispatcher 0.8.8 starting
Jan 19 08:23:59 archlinux-hostname systemd[828]: Started Speech-Dispatcher an high-level device independent layer for speech synthesis..

codingcoffee in ~ at archlinux-hostname 
➜ systemctl --user status speech-dispatcherd.service               
● speech-dispatcherd.service - Speech-Dispatcher an high-level device independent layer for speech synthesis.
   Loaded: loaded (/home/codingcoffee/.config/systemd/user/speech-dispatcherd.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Sat 2019-01-19 08:24:05 IST; 4s ago
  Process: 3241 ExecStart=/usr/bin/speech-dispatcher -d (code=exited, status=0/SUCCESS)

Jan 19 08:23:59 archlinux-hostname systemd[828]: Starting Speech-Dispatcher an high-level device independent layer for speech synthesis....
Jan 19 08:23:59 archlinux-hostname speech-dispatcher[3241]: [Sat Jan 19 08:23:59 2019 : 613105] speechd: Speech Dispatcher 0.8.8 starting
Jan 19 08:23:59 archlinux-hostname systemd[828]: Started Speech-Dispatcher an high-level device independent layer for speech synthesis..
Jan 19 08:24:05 archlinux-hostname systemd[828]: speech-dispatcherd.service: Succeeded.

3. I have already completed the configuration via spd-conf. And yes espeak-ng is also installed on the system. I had initially tried with espeak, but that didn't work either, so I had switched to espeak-ng. All the logs in this post are after installation of the espeak-ng package. I should've pointed it out earlier, my bad.

Also /usr/bin/espeak is symbolic link which points to /usr/bin/espeak-ng
And the output for following code is empty, i.e. both the configurations are the same

diff ~/.config/speech-dispatcher/modules/espeak.conf ~/.config/speech-dispatcher/modules/espeak-ng.conf

Thanks for helping out everyone! So any other suggestions I could try out!?

Offline

#7 2019-01-19 13:25:56

TCBear
Member
Registered: 2016-01-22
Posts: 34

Re: [SOLVED] Speech Dispatcher failing to start

*** Sorry, this doesn't apply to your issue. Please disreguard.
The only issue that comes to mind is that the speech-dispatcher documentation says pulseaudio has to be run as root in the non-graphical console environment. Espeak-ng might not work with alsa. I don't know whether you're using the console or a terminal from a desktop.
I use a desktop terminal with the Orca screen reader that connects to speech-dispatcher. The spd-conf diagnostic test does speak a test message for me. However, spd-say "test" does not speak "test." I was assuming it has something to do with Orca receiving priority.
Espeak-ng doesn't work with the console screen reader, so it would be difficult for me to test things in that environment.

Last edited by TCBear (2019-01-20 00:49:59)

Offline

#8 2019-01-19 16:14:41

TCBear
Member
Registered: 2016-01-22
Posts: 34

Re: [SOLVED] Speech Dispatcher failing to start

I thought of one other issue.
In the

~/.config/speech-dispatcher/speechd.config

file check the section "OUTPUT MODULES CONFIGURATION."
I remember deleting the hash mark on the line for the espeak-ng module:

AddModule "espeak-ng"    "sd_espeak-ng" "espeak-ng.conf"

The spd-config program didn't do this when it created the file.

I also tested spd-say from my console after a reboot this morning, and it worked on my system. What I brought up in my last post probably doesn't matter.

Last edited by TCBear (2019-01-19 21:41:37)

Offline

#9 2019-01-20 07:21:50

coding_coffee
Member
Registered: 2018-01-14
Posts: 4

Re: [SOLVED] Speech Dispatcher failing to start

@TCBear, thank you so much! Uncommenting this

AddModule "espeak-ng"    "sd_espeak-ng" "espeak-ng.conf"

solved the issue!!

Offline

#10 2021-11-11 05:37:26

chovy
Banned
Registered: 2020-12-29
Posts: 62

Re: [SOLVED] Speech Dispatcher failing to start

I get this error when starting `speech-dispatcher`

See "systemctl status speech-dispatcherd.service" and "journalctl -xeu speech-dispatcherd.service" for details.

Offline

#11 2021-11-11 05:38:21

chovy
Banned
Registered: 2020-12-29
Posts: 62

Re: [SOLVED] Speech Dispatcher failing to start

$ sudo journalctl -xeu speech-dispatcherd.service
░░ The unit speech-dispatcherd.service has entered the 'failed' state with result 'exit-code'.
Nov 10 21:33:56 wiley 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://forum.manjaro.org/c/support
░░ 
░░ A start job for unit speech-dispatcherd.service has finished with a failure.
░░ 
░░ The job identifier is 15866 and the job result is failed.

Offline

#12 2021-11-11 13:33:49

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] Speech Dispatcher failing to start

This thread is more than two years old and marked solved. Please do not necrobump.

Closing.

Offline

Board footer

Powered by FluxBB