Speech-dispatcherd.service stopped working after 20180308 release

hi,

not sure if anybody has the same issue or its my old system :slight_smile:
since the 20180308 release the speech dispatcher is no longer working

checkking systemctl gives:

# 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; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2018-03-12 18:34:05 CET; 15min ago

mrt 12 18:34:03 caladan systemd[1]: Starting Speech-Dispatcher an high-level device independent layer for speech synthesis....
mrt 12 18:34:03 caladan speech-dispatcher[1227]: [Mon Mar 12 18:34:03 2018 : 707891] speechd: Speech Dispatcher 0.8.8 starting
mrt 12 18:34:05 caladan systemd[1]: speech-dispatcherd.service: Control process exited, code=exited status=1
mrt 12 18:34:05 caladan systemd[1]: Failed to start Speech-Dispatcher an high-level device independent layer for speech synthesis..
mrt 12 18:34:05 caladan systemd[1]: speech-dispatcherd.service: Unit entered failed state.
mrt 12 18:34:05 caladan systemd[1]: speech-dispatcherd.service: Failed with result 'exit-code'.

so I checked out the speech-dispatcherd.service and noticed it simply starts /usr/bin/speech-dispatcher, so I did that with a -D -l 5 -d

# /usr/bin/speech-dispatcher -D -l 5 -d
[Mon Mar 12 18:37:38 2018 : 87355] speechd: Speech Dispatcher 0.8.8 starting
[Mon Mar 12 18:37:38 2018 : 87463] speechd:    Trying to find /run/user/1000/speech-dispatcher
[Mon Mar 12 18:37:38 2018 : 87553] speechd:    Using directory: /run/user/1000/speech-dispatcher for pidfile and logging
[Mon Mar 12 18:37:38 2018 : 87723] speechd:    Reading Speech Dispatcher configuration from /etc/speech-dispatcher/speechd.conf
[Mon Mar 12 18:37:38 2018 : 87822] speechd:     Config file include path is: /etc/speech-dispatcher

/tmp/speechd-debug # more speech-dispatcher.log 
[Mon Mar 12 18:37:38 2018 : 87355] speechd: Speech Dispatcher 0.8.8 starting
[Mon Mar 12 18:37:38 2018 : 87463] speechd: Trying to find /run/user/1000/speech-dispatcher
[Mon Mar 12 18:37:38 2018 : 87553] speechd: Using directory: /run/user/1000/speech-dispatcher for pidfile and logging
[Mon Mar 12 18:37:38 2018 : 87723] speechd: Reading Speech Dispatcher configuration from /etc/speech-dispatcher/speechd.conf
[Mon Mar 12 18:37:38 2018 : 87822] speechd: Config file include path is: /etc/speech-dispatcher
[Mon Mar 12 18:37:38 2018 : 87989] speechd: Speech Dispatcher Logging to file /run/user/1000/speech-dispatcher/log//speech-dispatcher.log
[Mon Mar 12 18:37:38 2018 : 88069] speechd: Module name=espeak being inserted into requested_modules list
[Mon Mar 12 18:37:38 2018 : 88104] speechd: Module name=dummy being inserted into requested_modules list
[Mon Mar 12 18:37:38 2018 : 88203] speechd: Reading configuration for pattern emacs:*
[Mon Mar 12 18:37:38 2018 : 88252] speechd: Configuration has been read from "/etc/speech-dispatcher/speechd.conf"
[Mon Mar 12 18:37:38 2018 : 88297] speechd: Initializing output module espeak with binary /usr/lib64/speech-dispatcher-modules/sd_espeak and configuration /etc/speech-dispatcher/modules/espeak.conf
[Mon Mar 12 18:37:38 2018 : 88315] speechd: Output module is logging to file /run/user/1000/speech-dispatcher/log//espeak.log
[Mon Mar 12 18:37:38 2018 : 88631] speechd: Module espeak loaded.
[Mon Mar 12 18:37:38 2018 : 88672] speechd: Trying to initialize espeak.
[Mon Mar 12 18:37:38 2018 : 88695] speechd: Command sent to output module: |INIT
| (0)
[Mon Mar 12 18:37:38 2018 : 88785] speechd: Exec of module "/usr/lib64/speech-dispatcher-modules/sd_espeak" with config "/etc/speech-dispatcher/modules/espeak.conf" failed with error 2: Bestand of map bestaat niet
[Mon Mar 12 18:37:38 2018 : 89017] speechd: ERROR: Bad syntax from output module espeak 1
[Mon Mar 12 18:37:38 2018 : 89064] speechd: Initializing output module dummy with binary /usr/lib64/speech-dispatcher-modules/sd_dummy and configuration (null)
[Mon Mar 12 18:37:38 2018 : 89082] speechd: Output module is logging to file /run/user/1000/speech-dispatcher/log//dummy.log
[Mon Mar 12 18:37:38 2018 : 89386] speechd: Module dummy loaded.
[Mon Mar 12 18:37:38 2018 : 89495] speechd: Trying to initialize dummy.
[Mon Mar 12 18:37:38 2018 : 89519] speechd: Command sent to output module: |INIT
| (0)
[Mon Mar 12 18:37:38 2018 : 91231] speechd: Reply from output module: 120 299-Everything ok so far.

[Mon Mar 12 18:37:38 2018 : 91257] speechd: Reply from output module: 120 299 OK LOADED SUCCESSFULLY

[Mon Mar 12 18:37:38 2018 : 91281] speechd: Module dummy started successfully with message: 
---------------
Everything ok so far.
---------------

[Mon Mar 12 18:37:38 2018 : 91300] speechd: Switching debugging on for output module dummy
[Mon Mar 12 18:37:38 2018 : 91316] speechd: Output module debug logging for dummy into /tmp/speechd-debug
[Mon Mar 12 18:37:38 2018 : 91333] speechd: Module sending debug flag 1 with file /tmp/speechd-debug/dummy.log
[Mon Mar 12 18:37:38 2018 : 91357] speechd: Command sent to output module: |DEBUG ON /tmp/speechd-debug/dummy.log 
| (1)
[Mon Mar 12 18:37:38 2018 : 91595] speechd: Got 20 bytes from output module over socket
[Mon Mar 12 18:37:38 2018 : 91614] speechd: Reply from output module: |200 OK DEBUGGING ON
|
[Mon Mar 12 18:37:38 2018 : 91631] speechd: Module set parameters.
[Mon Mar 12 18:37:38 2018 : 91657] speechd: Command sent to output module: |AUDIO
| (1)
[Mon Mar 12 18:37:38 2018 : 91792] speechd: Got 32 bytes from output module over socket
[Mon Mar 12 18:37:38 2018 : 91811] speechd: Reply from output module: |207 OK RECEIVING AUDIO SETTINGS
|
[Mon Mar 12 18:37:38 2018 : 91832] speechd: Command sent to output module: |audio_output_method=pulse
audio_oss_device=/dev/dsp
audio_alsa_device=default
audio_nas_server=tcp/localhost:5450
audio_pulse_server=default
audio_pulse_min_length=100
| (0)
[Mon Mar 12 18:37:38 2018 : 91852] speechd: Command sent to output module: |.
| (1)
[Mon Mar 12 18:37:38 2018 : 98282] speechd: Got 25 bytes from output module over socket
[Mon Mar 12 18:37:38 2018 : 98337] speechd: Reply from output module: |203 OK AUDIO INITIALIZED
|
[Mon Mar 12 18:37:38 2018 : 98360] speechd: Module set parameters.
[Mon Mar 12 18:37:38 2018 : 98391] speechd: Command sent to output module: |LOGLEVEL
| (1)
[Mon Mar 12 18:37:38 2018 : 98496] speechd: Got 35 bytes from output module over socket
[Mon Mar 12 18:37:38 2018 : 98519] speechd: Reply from output module: |207 OK RECEIVING LOGLEVEL SETTINGS
|
[Mon Mar 12 18:37:38 2018 : 98551] speechd: Command sent to output module: |log_level=0
| (0)
[Mon Mar 12 18:37:38 2018 : 98575] speechd: Command sent to output module: |.
| (1)
[Mon Mar 12 18:37:38 2018 : 98674] speechd: Got 21 bytes from output module over socket
[Mon Mar 12 18:37:38 2018 : 98697] speechd: Reply from output module: |203 OK LOG LEVEL SET
|
[Mon Mar 12 18:37:38 2018 : 98746] speechd: Speech Dispatcher Logging to file /run/user/1000/speech-dispatcher/log//speech-dispatcher.log
[Mon Mar 12 18:37:38 2018 : 98772] speechd: Speech Dispatcher started with 1 output module
[Mon Mar 12 18:37:38 2018 : 98799] speechd: Speech Dispatcher will use local unix socket: /run/user/1000/speech-dispatcher/speechd.sock
[Mon Mar 12 18:37:38 2018 : 99451] speechd: Creating new thread for speak()
[Mon Mar 12 18:37:38 2018 : 99534] speechd: Speech Dispatcher started and waiting for clients ...
[Mon Mar 12 18:37:38 2018 : 99559] speechd: Currently no clients connected, enabling shutdown timer.
[Mon Mar 12 18:37:43 2018 : 772376] speechd: Terminating...
[Mon Mar 12 18:37:43 2018 : 772417] speechd: Closing open connections...
[Mon Mar 12 18:37:43 2018 : 772446] speechd: Closing speak() thread...
[Mon Mar 12 18:37:43 2018 : 772780] speechd: Closing open output modules...
[Mon Mar 12 18:37:43 2018 : 772812] speechd: Unloading module name=dummy
[Mon Mar 12 18:37:43 2018 : 772834] speechd: Closing module "dummy"...
[Mon Mar 12 18:37:43 2018 : 772861] speechd: Command sent to output module: |STOP
| (0)
[Mon Mar 12 18:37:43 2018 : 772882] speechd: Command sent to output module: |QUIT
| (1)
[Mon Mar 12 18:37:43 2018 : 773112] speechd: Got 12 bytes from output module over socket
[Mon Mar 12 18:37:43 2018 : 773140] speechd: Reply from output module: |210 OK QUIT
|
[Mon Mar 12 18:37:43 2018 : 773319] speechd: Waiting for module pid 3413
[Mon Mar 12 18:37:43 2018 : 773340] speechd: ERROR: waitpid() failed when waiting for child (module).
[Mon Mar 12 18:37:43 2018 : 773366] speechd: Closing server connection...
[Mon Mar 12 18:37:43 2018 : 773395] speechd: Removing pid file
[Mon Mar 12 18:37:43 2018 : 773658] speechd: Speech Dispatcher terminated correctly  

only think interesting I can see there is:

Exec of module “/usr/lib64/speech-dispatcher-modules/sd_espeak” with config “/etc/speech-dispatcher/modules/espeak.conf” failed with error 2: Bestand of map bestaat niet

however that file does exists

ls -l /etc/speech-dispatcher/modules/espeak.conf
-rw-r--r-- 1 root root 1624  8 mrt 12:03 /etc/speech-dispatcher/modules/espeak.conf

did check that file with a diff from a disk backup but apart from a different date they are identical, so I doubt the file itself is the issue…

I would not mind creating a ticket but want to be sure its no just my old system.

From your posted output…

it looks like first your espeak module was loaded and attempted to initialize, but failed due to a syntax error, ie a faulty command.

Then, a “dummy” module was similarly loaded and initialized which was successful, followed by a number of tests and then exited without significant incident (only a probably insignificant error).

Also, apparently you should see some rellevant verbose entries related to your error, I recommend you tail the following logfile

/run/user/1000/speech-dispatcher/log//espeak.log

HTH,
TSU

I’m not sure but that just as well might mean that /usr/lib64/speech-dispatcher-modules/sd_espeak doesn’t exist.

AFAICS, Tumbleweed switched to espeak-ng recently, and speech-dispatcher-module-espeak contains only /usr/lib64/speech-dispatcher-modules/sd_espeak-ng now.

So you’d probably need to adjust the speech-dispatcher config file, if you modified it in the past it won’t be updated automatically.
Do you have a /etc/speech-dispatcher/speechd.conf.rpmnew or similar?

right ! that seems to be the answer, however I uninstalled speech-dispatcher and deleted /etc/speech-dispatcher just to be sure and then installed it again.
also did a reinstall of the speech-distpatcher-module-espeak

A new /etc/speech-dispatcher/speechd.conf was created with this:


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

and speech-distpatcher-module-espeak only contains sd_espeak-ng and no longer sd_espeak.

So the 2nd Addmodule line now needs to be enabled and the first disabled. then it works.

thank you for putting me on the right track, should this be posted at buggzilla as it seems an error in the conf file ?

In any case, try to change the line:

AddModule "espeak"       "sd_espeak"   "espeak.conf"

to:

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

in /etc/speech-dispatcher/speechd.conf …

Yes.

The package build script does try to replace espeak with espeak-ng, while enabling it:

sed -i "s/#AddModule \"espeak\"/AddModule \"%{espeak}\"/" -i config/speechd.conf 

(where %{espeak} expands to “espeak-ng”)

But this obviously doesn’t work as intended, as the resulting config file (shipped in the package) contains this:

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

(the second line is also not completely correct, as the config file is still named espeak.conf …)

In other words, the speech-dispatcher package contains a “broken” config file and needs to be fixed.

You can of course fix it yourself to get it to work, the line should look like this AFAICT:

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

okay, will make a bug report then.
I chose the 2nd AddModule as it made more sense (with the espeak-ng.conf) and disabled the first AddModule.
Not sure how the script comes into play as its was a clean install, but maybe you mean the script on the builder side and not my side :slight_smile:

Note the end of my previous reply though (which I edited probably after you read it), the config file is actually still named espeak.conf for some reason.

Not sure how the script comes into play as its was a clean install, but maybe you mean the script on the builder side and not my side :slight_smile:

Yes, that’s done when the package is built.
That sed line modifies the speechd.conf that is shipped with the sources, and enables the espeak module by default.