Closed guest271314 closed 1 year ago
I see, spd-conf was not able to set DefaultModule because of a mere missing space.
You can fix your configuration by editing .config/speech-dispatcher/speechd.conf
, finding the line where DefaultModule
is set, and drop the #
character that is at the beginning of it.
That is one part of the issue. The other part is speech-dispatcher does not want to autospawn. So where I would normally see speech-dispatcher-espeak-ng in Pulse Audio controls persistently it ain't there at all, so no sounf is output when I use speechSynthesis.speak()
.
The other part is speech-dispatcher does not want to autospawn
We'd need the real full logs to determine what is happening.
[Sat Apr 8 08:38:54 2023 : 973935] speechd: Exec of module "/usr/local/libexec/speech-dispatcher-modules/sd_espeak-ng" with config "/home/xubuntu/.config/speech-dispatcher/modules/espeak-ng.conf" failed with error 2: No such file or directory
That's odd, it seems it's getting configuration files wrongly. Could you increase LogLevel to 5 in speechd.conf and retry, so we get to know how things are going exactly?
Alright, I set LogLevel to 5 in ~/.config/speech-dispatcher/speechd.conf
and ran speech-dispatcher restart
. What should I do now?
well, try again to trigger auto-spawn? And post the resulting log file
I just ran speech-dispatcher -a
and speech-dispatcher-espeak-ng
is not showing up in Pulse Audio audio mixer (pavu). I've uninstalled
sudo apt --purge remove python3-speechd speech-dispatcher-espeak-ng espeak-ng
and reinstalled
sudo apt install remove python3-speechd speech-dispatcher-espeak-ng espeak-ng
and built speechd
from a downloaded tarball of this repository. I am ready to start from scratch again if that what is needed.
I'm just conveying to you something is a foot. speech-dispatcher
used to just work for speech synthesis interface to Web Speech API.
$ speech-dispatcher -a
[Sat Apr 8 09:18:51 2023 : 105594] speechd: Speech Dispatcher 0.11.4 starting
$ spd-say test
Failed to connect to Speech Dispatcher:
Error: Can't connect to unix socket /run/user/999/speech-dispatcher/speechd.sock: Connection refused. Autospawn: Autospawn failed. Speech Dispatcher refused to start with error code, stating this as a reason:
[Sat Apr 8 09:18:51 2023 : 106717] speechd: Reading configuration for pattern emacs:*
[Sat Apr 8 09:18:51 2023 : 106768] speechd: Configuration has been read from "/home/xubuntu/.config/speech-dispatcher/speechd.conf"
[Sat Apr 8 09:18:51 2023 : 106844] speechd: Initializing output module espeak-ng with binary /usr/local/libexec/speech-dispatcher-modules/sd_espeak-ng and configuration /home/xubuntu/.config/speech-dispatcher/modules/espeak-ng.conf
[Sat Apr 8 09:18:51 2023 : 106865] speechd: Output module is logging to file /run/user/999/speech-dispatcher/log//espeak-ng.log
[Sat Apr 8 09:18:51 2023 : 107391] speechd: Module espeak-ng loaded.
[Sat Apr 8 09:18:51 2023 : 107431] speechd: Trying to initialize espeak-ng.
[Sat Apr 8 09:18:51 2023 : 107460] speechd: Command sent to output module: |INIT
| (0)
[Sat Apr 8 09:18:51 2023 : 107488] speechd: Exec of module "/usr/local/libexec/speech-dispatcher-modules/sd_espeak-ng" with config "/home/xubuntu/.config/speech-dispatcher/modules/espeak-ng.conf" failed with error 2: No such file or directory
[Sat Apr 8 09:18:51 2023 : 107955] speechd: ERROR: Bad syntax from output module espeak-ng 1
[Sat Apr 8 09:18:51 2023 : 108054] speechd: Speech Dispatcher Logging to file /run/user/999/speech-dispatcher/log//speech-dispatcher.log
[Sat Apr 8 09:18:51 2023 : 108077] speechd: Error [speechd.c:672]:No speech output modules were loaded - aborting...
[Sat Apr 8 09:31:50 2023 : 203742] speechd: Speech Dispatcher Logging to file /run/user/999/speech-dispatcher/log//speech-dispatcher.log
[Sat Apr 8 09:31:50 2023 : 203853] speechd: Will load symbol file gender-neutral.dic
[Sat Apr 8 09:31:50 2023 : 203875] speechd: Will load symbol file font-variants.dic
[Sat Apr 8 09:31:50 2023 : 203897] speechd: Will load symbol file symbols.dic
[Sat Apr 8 09:31:50 2023 : 203920] speechd: Will load symbol file emojis.dic
[Sat Apr 8 09:31:50 2023 : 203942] speechd: Will load symbol file orca.dic
[Sat Apr 8 09:31:50 2023 : 203963] speechd: Will load symbol file orca-chars.dic
[Sat Apr 8 09:31:50 2023 : 204010] speechd: Module name=espeak-ng being inserted into requested_modules list, with 'sd_espeak-ng' 'espeak-ng.conf' '/run/user/999/speech-dispatcher/log//espeak-ng.log' '(null)' '(null)'
[Sat Apr 8 09:31:50 2023 : 204162] speechd: Reading configuration for pattern emacs:*
[Sat Apr 8 09:31:50 2023 : 204213] speechd: Configuration has been read from "/home/xubuntu/.config/speech-dispatcher/speechd.conf"
[Sat Apr 8 09:31:50 2023 : 204293] speechd: Initializing output module espeak-ng with binary /usr/local/libexec/speech-dispatcher-modules/sd_espeak-ng and configuration /home/xubuntu/.config/speech-dispatcher/modules/espeak-ng.conf
[Sat Apr 8 09:31:50 2023 : 204313] speechd: Output module is logging to file /run/user/999/speech-dispatcher/log//espeak-ng.log
[Sat Apr 8 09:31:50 2023 : 204841] speechd: Module espeak-ng loaded.
[Sat Apr 8 09:31:50 2023 : 204885] speechd: Trying to initialize espeak-ng.
[Sat Apr 8 09:31:50 2023 : 204914] speechd: Command sent to output module: |INIT
| (0)
[Sat Apr 8 09:31:50 2023 : 204964] speechd: Exec of module "/usr/local/libexec/speech-dispatcher-modules/sd_espeak-ng" with config "/home/xubuntu/.config/speech-dispatcher/modules/espeak-ng.conf" failed with error 2: No such file or directory
[Sat Apr 8 09:31:50 2023 : 205465] speechd: ERROR: Bad syntax from output module espeak-ng 1
[Sat Apr 8 09:31:50 2023 : 205558] speechd: Speech Dispatcher Logging to file /run/user/999/speech-dispatcher/log//speech-dispatcher.log
[Sat Apr 8 09:31:50 2023 : 205586] speechd: Error [speechd.c:672]:No speech output modules were loaded - aborting...
Could you also post your /home/xubuntu/.config/speech-dispatcher/speechd.conf
?
I really don't understand why it's trying to open the configuration file from your user directory...
Could you try with the latest master and post the resulting log file?
Could you try with the latest master and post the resulting log file?
You mean building speech-dispatcher?
How do I make sure I get rid of all speech-dispatcher artifacts on the system?
It looks like the program is having issues autospawning.
You mean building speech-dispatcher?
Yes.
How do I make sure I get rid of all speech-dispatcher artifacts on the system?
You can for instance uninstall the system package
It looks like the program is having issues autospawning.
It's not the autospawn the problem, but the start of speech-dispatcher itself:
No speech output modules were loaded - aborting...
Will your speech-dispatcher-0.11.4 unarchived work for the build? Any flags I need to pass to configure of make?
Will your speech-dispatcher-0.11.4 unarchived work for the build?
I don't understand this.
Any flags I need to pass to configure of make?
Default parameters should be just fine (otherwise it would be a bug...)
Is there any reason ./configure --with-espeak-ng
says it can't find espeak-ng
even though the package is installed?
checking for espeak_Synth in -lespeak... no
checking for espeak-ng... no
configure: error: in `/home/xubuntu/Downloads/speech-dispatcher-0.11.4':
configure: error: espeak-ng is not available
See `config.log' for more details
See `config.log' for more details
configure:22972: checking for espeak-ng
configure:22979: $PKG_CONFIG --exists --print-errors "espeak-ng"
Package espeak-ng was not found in the pkg-config search path.
Perhaps you should add the directory containing `espeak-ng.pc'
to the PKG_CONFIG_PATH environment variable
No package 'espeak-ng' found
Not sure how that is possible. espeak-ng
is right there in /usr/bin
Compiled
$ spd-say -O OUTPUT MODULES
How do I set `espeak-ng` as the default output module?
Interesting
$ spd-conf -u
Traceback (most recent call last):
File "/usr/local/bin/spd-conf", line 22, in <module>
import speechd_config
ModuleNotFoundError: No module named 'speechd_config'
Not sure how that is possible. espeak-ng is right there in /usr/bin
It's not looking for the espeak-ng program, but for the espeak-ng library, necessary to be able to build the espeak-ng sd module at all. You needs to install the development package of espeak-ng, something like libespeak-ng-dev
.
ModuleNotFoundError: No module named 'speechd_config'
Your distribution is probably missing adding /usr/local/lib/python3.11/site-packages
to your PYTHONPATH
WHy is all of this happening all of a sudden? Not that long ago I could just install python3-speechd
, espeak-ng
with apt
, run spd-conf -u
and be done with the matter.
$ sudo apt install libespeak-ng-dev
$ spd-conf -u
Traceback (most recent call last):
File "/usr/local/bin/spd-conf", line 22, in <module>
import speechd_config
ModuleNotFoundError: No module named 'speechd_config'
WHy is all of this happening all of a sudden? Not that long ago I could just install python3-speechd, espeak-ng with apt, run spd-conf -u and be done with the matter
You uninstalled python3-speechd, didn't you?
$ sudo apt install libespeak-ng-dev
$ spd-conf -u
libespeak-ng-dev is needed at the ./configure
step. You need to restart from there.
Same error is thrown for spd-conf -u
.
Installing libespeak-ng-dev is not meant to fix spd-conf -u
, but to fix building the espeak-ng sd module. Does spd-say -O
mention espeak-ng now?
Concerning spd-conf -u
, as I mentioned you need to set your PYTHONPATH
since apparently your distrib doesn't do it for you. Something like
export PYTHONPATH=/usr/local/lib/python3.11/site-packages
of course in that example you need to fix the path according to where speechd_config
ended up.
of course in that example you need to fix the path according to where speechd_config ended up.
How do I determine that?
Does
spd-say -O
mention espeak-ng now?
Yes.
How do I determine that?
Well, look at what is there in /usr/local/lib etc.
Got it working in the browser. Is this an anamoly or something that should be jotted down as installation notes?
Got it working in the browser
Did you do anything particular to get it working?
Follow the instructions in this issue and finally
export PYTHONPATH=/usr/local/lib/python3.10/site-packages
followed by
spd-conf -u
then tested with https://guest271314.github.io/SSMLParser/.
It didn't use to be this complicated.
I have something like this in a startup script I run when I boot a new live-CD
sudo apt-get -y install libtool \
libcurl4-openssl-dev \
texinfo \
cmake \
bleachbit \
espeak-ng \
python3-speechd \
mpv \
git \
libssl-dev \
build-essential
I ran this code https://edvins.io/react-text-to-speech the other day and afterwards speechSynthesis.speak()
didn't want to work.
Sure enough, after trying to run the code on this page https://edvins.io/react-text-to-speech speech-dispatcher-espeak-ng
disappears from Pulse Audio audio mixer control, and spd-say test
doesn't output audio any more. Using window.speechSynthesis.speak()
shouldn't be able to mess with speech-dispatcher
like that. What is going on?
What is going on?
As usual, the logs will tell us.
It didn't use to be this complicated.
That's just because in this case we have been installing by hand to try to debunk what's getting wrong with your distribution-provided version.
Please remember to set LogLevel to 5, otherwise the log doesn't contain precious information for debugging
and ideally, remove the log files before starting your test, so that the log only contains information about your test
I think something on the linked page is breaking speech-dispatcher
. Never observed that happen before where calling speechSynthesis.speak()
and resume()
makes speech-dispatcher-espeak-ng
disappear from the Pulse Audio Playback page.
That is what lead me here to file this issue.
I removed the file speech-dispatcher.log from /run/user/999/speech-dispatcher/log.
It's is not getting recreated after speech-dispatcher restart
. I think I can get speech-dispatcher
working again by re-building after the audio stops working.
Not sure how that log file get recreated.
speech-dispatcher restart
What do you mean exactly by this? If you are also running a root-started speech-dispatcher, we'll get lost between your user's speech-dispatcher and root's speech-dispatcher. Autospawn does not need a root-started speech-dispatcher.
I don't see a way to restart speech-dispatcher
in option so that's what I have been using.
I just re-created the log file in /log
.
Then ran speech-dispatcher -l 5
.
Audio just stopped when I pushed pause and then resume on the page that is causing the issue.
Nothing is witten to the speech-dispatcher.log file. So I need instructions on how to re-create that file, and re-start speech-dispatcher
after setting LogLevel to 5.
I don't see a way to restart speech-dispatcher in option so that's what I have been using.
where that is what? Please actually answer my questions otherwise I have no idea what you are actually doing.
If you want to kill an existing speech-dispatcher you can just run killall speech-dispatcher
I just re-created the log file in /log.
That won't help. speech-dispatcher knows to create the log whenever it needs to. But for that to happen you need to avoid a root-started speech-dispatcher. E.g. use systemctl stop speech-dispatcher
I need instructions on how to re-create that file
No, you don't need to create it
and re-start speech-dispatcher after setting LogLevel to 5
No, you don't want to restart it, you want to kill the existing instance. So that auto-spawn actually happens just the way you had it at the very very beginning of this whole issue tracking.
What do you mean exactly by this?
where that is what? Please actually answer my questions otherwise I have no idea what you are actually doing.
I'm trying to restart speech-dispatcher.
Alright. I think I followed the instructions and here is the log file. Let me know if I missed something.
What happens is TTS audio stops being output altogether after I press play and pause then resume here https://edvins.io/react-text-to-speech. Which means this https://guest271314.github.io/SSMLParser/ doesn't output audio after I press play, pause , then resume on the above site.
Looks like speech-dispatcher is breaking on speechSynthesis.pause()
on Chromium 114.
speechSynthesis.pause()
worked once on Firefox Nightly 113, then didn't work at all afterwards.
here is the log file
Ok, but a log of what test? All I can see there is two calls to spd-say yo
, was there actually a bug while doing it?
I'm obviously on Linux. Each time I call speechSynthesis.pause()
I have to restart everything, kill speech-dispatcher and run speech-dispatcher -a
then I test with spd-say yo
before trying on a Web page.
Steps to reproduce
Install
espeak-ng
.spd-conf -u
, setespeak-ng
as default speech synthesis engine.Obtained behavior
spd-say -)
listsespeak-ng-mbrola
. I never installedespeak-ng-mbrola
that I am aware of.Expected behavior
speech-dispatcher
to work as it used to.Behavior information
Please follow the next step, to provide us with precious information about how things went wrong on your machine:
LogLevel
to 5 in your/etc/speech-dispacher/speechd.conf
speech-dispacher.log
file, it is usually found in/run/user/1000/speech-dispatcher/log
. Also make a copy ofyourspeechmodule.log
(e.g.espeak-ng.log
).LogLevel
back to 3 in your/etc/speech-dispacher/speechd.conf
speech-dispatcher.log
andyourspeechmodule.log
file to your bug report.Distribution
Xubuntu 22.04
Version of Speech-dispatcher
speech-dispatcher 0.11.1
I also tried building speech-dispatcher from this repository. Different error, still no voices.
I initially observed this testing
window.speechSynthesis.speak()
.