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

speech-dispatcher doesn't come with the necessary socket to make it work with some Flatpak apps #569

Open
not-a-dev-stein opened this issue May 30, 2024 · 7 comments
Labels
bug Something isn't working f40 Related to Fedora 40 upstream Issue reported, fixed or related to upstream projects

Comments

@not-a-dev-stein
Copy link

not-a-dev-stein commented May 30, 2024

Describe the bug
The speech-dispatcher package needed for screen reader support doesn't come with the necessary /usr/lib/systemd/user/speech-dispatcher.socket to make it work with some Flatpak apps (in my testing mainly Firefox through Flatpak and Foliate).

The current workaround is to manually run /usr/bin/speech-dispatcher -d -t 0 in the terminal before opening the apps to make them work, but we shouldn't need it.

Currently, if you try to use the speech-dispatcher.service and the speech-dispatcherd.service both of them give out this error:

mai 28 18:09:53 casper-3 speech-dispatcher[4166]: [Tue May 28 18:09:53 2024 : 502906] speechd: Can't create pid file in /root/.cache/speech-dispatcher/pid/speech-dispatcher.pid, wrong permissions?
mai 28 18:09:53 casper-3 speech-dispatcher[4166]: Can't create pid file in /root/.cache/speech-dispatcher/pid/speech-dispatcher.pid, wrong permissions?

I'm not 100% sure if this is an issue just with Silverblue or with both SB and Workstation, but as I found it on SB I decided to report it here, and I couldn't find an open issue about it for Workstation. As far as I'm aware the only distro properly shipping it is Ubuntu.

To Reproduce
Please describe the steps needed to reproduce the bug:

  1. Run ls /usr/lib/systemd/user | grep speech to make sure the file socket file isn't there, which it probably isn't.
  2. Open Firefox installed through Flathub.
  3. Try to open an article in Reader Mode (this is a random example)
  4. Notice that the headphones icon for the Read Aloud option doesn't show up.
  5. Close the app, open a terminal and run /usr/bin/speech-dispatcher -d -t 0
  6. Go through steps 2-3 again and notice it now works.

You can try the same thing with Foliate, as you'll get this error message if you try to use the read aloud option without running the command.

Expected behavior
Speech-dispatcher would be able to read aloud the content in apps run through Flatpak.

Screenshots
image

  1. Error given by Foliate when the speech-dispatcher server isn't running.

image
2. Firefox's Reader mode working after manually running the server.

OS version:

ostree-image-signed:docker://ghcr.io/ublue-os/silverblue-nvidia:40

I've been using the latest Universal Blue Silverblue image, but also tested in the latest vanilla Silverblue image, I just haven't tested on Workstation.

Additional context
This merge request for Flatpak might be related in some level, but I'm not 100% sure:
flatpak/flatpak#5272

@not-a-dev-stein not-a-dev-stein added the bug Something isn't working label May 30, 2024
@travier travier added the f40 Related to Fedora 40 label May 31, 2024
@travier
Copy link
Member

travier commented May 31, 2024

Looks like this should definitely be a user unit and not a system one. Can you file a bug in bugzilla for this package and link it here? Thanks

@travier travier added the upstream Issue reported, fixed or related to upstream projects label May 31, 2024
@travier
Copy link
Member

travier commented May 31, 2024

Looks like the package should be using another configure flag to get user units instead of a system one.

@travier
Copy link
Member

travier commented May 31, 2024

Ah, this is not yet available in a released version of speechd :/

@not-a-dev-stein
Copy link
Author

Double checking this then, couldn't we patch the package in the meanwhile? We could look at how Ubuntu is packaging it to have the socket work, as AFAIK they have a fully working package. Could you link me the Bugzilla page for the package, I'll open an issue and hope for the best.

@travier
Copy link
Member

travier commented Jun 3, 2024

To open a bug for speech-dispatcher: https://bugzilla.redhat.com/enter_bug.cgi?component=speech-dispatcher&product=Fedora

Specfile in: https://src.fedoraproject.org/rpms/speech-dispatcher

@travier
Copy link
Member

travier commented Jun 3, 2024

Ubuntu is shipping an non-stable (rc) version: https://packages.ubuntu.com/source/noble/speech-dispatcher

@not-a-dev-stein
Copy link
Author

To open a bug for speech-dispatcher: https://bugzilla.redhat.com/enter_bug.cgi?component=speech-dispatcher&product=Fedora

Issue opened! Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working f40 Related to Fedora 40 upstream Issue reported, fixed or related to upstream projects
Projects
None yet
Development

No branches or pull requests

2 participants