Hi, On 2017-04-21 14:18, Paul Gevers wrote: > On 19-04-17 22:28, MENGUAL Jean-Philippe wrote: >> 1st, I have always had the idea the the spd service had bugs and was not >> really usable: spent so resource, didn't run really, etc. Hence the fact >> it's always been in "no" in defaults/speech-dispatcher. > So, does that mean that speechd-up should also have such a mechanism > that defaults to no? > > What I am now seeing is that speech-dispatcher doesn't stay running when > started with it's init script. If I start it with "sudo service > speech-dispatcher start" than it is in the "active (running)" state for > about 20 seconds and then goes to an "active (exited)" state. I expect > that speechd-up is failing to start because it actually checks if it can > USE speech-dispatcher. > > Two things that I then noticed, the man page of speech-dispatcher > mentions that it needs to be started with the "-d" option to run as > daemon (which isn't present in its init file). With debugging > information added I then noticed the following in > /tmp/speechd-debug/speech-dispatcher.log: > [Fri Apr 21 14:10:00 2017 : 638612] speechd: Currently no clients > connected, enabling shutdown timer. > [Fri Apr 21 14:10:05 2017 : 713820] speechd: Terminating... > > So it seems speech-dispatcher doesn't want to stay running as daemon. I > guess this is the real issue at stake. (Should we reassign?)
The man page states: "speech-dispatcher is usually started automatically by client libraries (i.e. autospawn), so you only need to run it manually if testing/debugging, or when in other explicit need for a special setup." So this behaviour doesn't seem broken to me, that's rather exactly as expected. Also, starting speechd-up with start-stop-daemon doesn't show any failures, despite missing special handling of speech-dispatcher. There is an open bug about autospawn with multiple users in #616313, but I don't see an immediate connection to our issues; we're always root and not touching speechd-up directly. I enabled this line in /etc/speech-dispatcher/speechd.conf: CustomLogFile "protocol" "/var/log/speech-dispatcher/speech-dispatcher-protocol.log" /var/log/speech-dispatcher/speech-dispatcher-protocol.log stays empty when using service (my VM is still using sysvinit-core now), but when I use the usual start-stop-daemon command, I get this log: [Thu Apr 20 15:31:30 2017 : 10113] speechd: 22:DATA:|SET SELF CLIENT_NAME "test:speakup:softsynth" | (47) [Thu Apr 20 15:31:30 2017 : 10730] speechd: 22:REPLY:|208 OK CLIENT NAME SET | [Thu Apr 20 15:31:30 2017 : 11457] speechd: 22:DATA:|SET SELF NOTIFICATION index_marks on | (38) [Thu Apr 20 15:31:30 2017 : 11490] speechd: 22:REPLY:|220 OK NOTIFICATION SET | [Thu Apr 20 15:31:30 2017 : 11860] speechd: 22:DATA:|SET SELF NOTIFICATION all on | (30) [Thu Apr 20 15:31:30 2017 : 11890] speechd: 22:REPLY:|220 OK NOTIFICATION SET | [Thu Apr 20 15:31:30 2017 : 12102] speechd: 22:DATA:|SET SELF CAP_LET_RECOGN none | (30) [Thu Apr 20 15:31:30 2017 : 12131] speechd: 22:REPLY:|206 OK CAP LET RECOGNITION SET | [Thu Apr 20 15:31:30 2017 : 12356] speechd: 22:DATA:|SET SELF SSML_MODE on | (23) [Thu Apr 20 15:31:30 2017 : 12380] speechd: 22:REPLY:|219 OK SSML MODE SET | To me, this confirms that autospawn is working, but not when speechd-up is started by any init system despite having the exact same command line. I didn't bother switching to systemd again for now. I also dumped the env from bash and the initd script, but couldn't see any suspicous differences. If only speechd-up could provide some detailed logs, but it isn't particularly chatty when starting up, despite LogLevel 5. Also, I can confirm hearing some speech at one point when manually starting speechd-up with start-stop-daemon, but the volume was too low to understand what it was and it didn't happen again.