After bug 1666703 is fixed, there are still a few roadblocks:
- we need to add `libspeechd2` as a `stage-packages` component in the firefox snap
- we need to `prime` `usr/lib/*/libspeechd.so.*`
That is still not enough. By default, communication is done over a socket `$XDG_RUNTIME_DIR/speech-dispatcher/speechd.sock`, granting this would need some snapd interface change.
Experimenting further by forcing `SPEECHD_ADDRESS=inet_socket` (as well as in the configuration file `/etc/speech-dispatcher/speechd.conf`, one still cannot get `speechSynthesis.getVoices()` to return more than an empty array. It looks like `libspeechd2` somehow handles some auto spawning of the daemon, and I assume this is getting blocked by the Snap-level sandboxing.
This can be bypassed by issuing `spd-say -L` aside of a running Firefox, and once you have a process spawn quickly isssuing a `speechSynthesis.getVoices()` to connect to it. Once that is done, Speech Synthesis can work.
After bug 1666703 is fixed, there are still a few roadblocks: */libspeechd. so.*`
- we need to add `libspeechd2` as a `stage-packages` component in the firefox snap
- we need to `prime` `usr/lib/
That is still not enough. By default, communication is done over a socket `$XDG_RUNTIME_ DIR/speech- dispatcher/ speechd. sock`, granting this would need some snapd interface change.
Experimenting further by forcing `SPEECHD_ ADDRESS= inet_socket` (as well as in the configuration file `/etc/speech- dispatcher/ speechd. conf`, one still cannot get `speechSynthesi s.getVoices( )` to return more than an empty array. It looks like `libspeechd2` somehow handles some auto spawning of the daemon, and I assume this is getting blocked by the Snap-level sandboxing.
This can be bypassed by issuing `spd-say -L` aside of a running Firefox, and once you have a process spawn quickly isssuing a `speechSynthesi s.getVoices( )` to connect to it. Once that is done, Speech Synthesis can work.