My guide to setting up espeakup on Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello speakup friends,

I've been spending the week trying to get speakup to play nice with sound
servers and seat management on Linux. If you're interesting for the gory details,
see my full article here: https://www.jookia.org/wiki/System-wide_speakup (WIP)

Anyway I wanted to share an excerpt from my page: How to run espeakup as your
own user, have it start at boot and have it read your login prompt even if you
log in as root or yourself.

These steps are for Arch Linux but they should work for any distro that uses
systemd. I've also explained what things actually do and why. I'd appreciate
feedback and will update the original page with better instructions.

Jookia.

Running espeakup as your user
-----------------------------

It's possible to run espeakup as your own user by:

- Taking control of the audio device away from logind
- Giving control of all audio devices to your user
- Giving control of the softsynth to your user
- Running espeakup as a daemon as your user
- Running espeakup at boot as your user

I've prepared steps to follow to get this working below.

Paste lines between --- PASTE START --- and --- PASTE END --- in to the file specified or a terminal.

Step 1: Put this in /etc/modules-load.d/speakup.conf

--- PASTE START ---
speakup
speakup_soft
--- PASTE END ---

This will cause the speakup kernel modules to load at boot.

Step 2: Put this in /etc/udev/rules.d/99-speakup.rules

--- PASTE START ---
SUBSYSTEM=="sound", TAG-="seat", GROUP="audio"
KERNEL=="softsynth*", GROUP="audio"
--- PASTE END ---

This will will do three things:

- Stop logind managing sound devices
- Give users in the audio group access to sound devices
- Give users in the audio group access to Speakup

Step 3: Put this in ~/.config/systemd/user/espeakup.service

--- PASTE START ---
[Unit]
Description=Software speech output for Speakup
After=pulseaudio.service
[Service]
Environment="default_voice= ALSA_CARD="
ExecStart=/usr/bin/espeakup -d --default-voice=${default_voice}
Restart=always
Nice=-10
OOMScoreAdjust=-900
[Install]
WantedBy=default.target
--- PASTE END ---

This is a service that just runs the espeakup daemon. It is set to start after pulseaudio.

Change pulseaudio.service to pipewire.service if you're using on PipeWire.

Step 4: Run these commands:

--- PASTE START ---
systemctl --user enable espeakup
loginctl enable-linger
sudo gpasswd -a $USER audio
--- PASTE END ---

This does three things:

- Enable the speakup user service
- Enable running user services when logged out
- Add your user to the audio group

Step 5: Reboot and run espeakup as your user.

There's two downsides to this method:

- Your user can see what other users are reading, including root
- Other users can't play audio




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]

  Powered by Linux