Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable access to espeak-ng and its data files for text to speech in the "reader view" #6484

Open
7 tasks done
Liorst4 opened this issue Sep 21, 2024 · 0 comments
Open
7 tasks done

Comments

@Liorst4
Copy link
Contributor

Liorst4 commented Sep 21, 2024

Description

When using reader view in firefox, the text to speech feature will fail, because it can't access espeak-ng and its data files.
Firefox on linux uses speech-dispatcher for text to speech.
speech-dispatcher may use espeak-ng (I think it has other backends).

So firefox needs to be able to access the espeak-ng binary and its data files.

https://freebsoft.org/speechd
https://github.com/espeak-ng/espeak-ng

Steps to Reproduce

Run firefox under firejail.
Find an article with lots of text, use the reader view button.
In reader view press the headphones buttons and then the play buttons.

https://support.mozilla.org/en-US/kb/firefox-reader-view-clutter-free-web-pages

Expected behavior

Firefox should use espeak-ng to play a reading of the text.

Actual behavior

Speech dispatcher will play an error message about not being able to find any modules.
Something along the lines of "Its seems like your speech dispatcher is working but none of its sound modules are"

Additional context

I tried to play around with the profile config files.
I was able to make the text to speech work, but it broke other stuff, so this solution is not PR worthy.

noblacklist /usr/bin/espeak-ng
noblacklist /usr/share/espeak-ng-data
noblacklist /usr/share/speech-dispatcher
noblacklist /etc/speech-dispatcher
noblacklist /usr/bin/speech-dispatcher
noblacklist /usr/bin/spd-conf
noblacklist /usr/bin/spd-say
noblacklist /usr/bin/spdsend

include /etc/firejail/firefox.profile

whitelist /usr/share/espeak-ng-data
whitelist /usr/share/speech-dispatcher
whitelist /etc/speech-dispatcher

Checklist

  • The issues is caused by firejail (i.e. running the program by path (e.g. /usr/bin/vlc) "fixes" it).
  • I can reproduce the issue without custom modifications (e.g. globals.local).
  • The program has a profile. (If not, request one in https://github.com/netblue30/firejail/issues/1139)
  • The profile (and redirect profile if exists) hasn't already been fixed upstream.
  • I have performed a short search for similar issues (to avoid opening a duplicate).
    • I'm aware of browser-allow-drm yes/browser-disable-u2f no in firejail.config to allow DRM/U2F in browsers.
  • I used --profile=PROFILENAME to set the right profile. (Only relevant for AppImages)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant