Editing System-wide speakup
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 26: | Line 26: | ||
# Linux boots | # Linux boots | ||
# systemd gives root the current audio device | # systemd gives root the current audio device | ||
# systemd starts espeakup as root | # systemd starts starts espeakup as root | ||
# You can read the login prompt or login as root | # You can read the login prompt or login as root | ||
# You log in as your own user | # You log in as your own user | ||
Line 114: | Line 114: | ||
Change <code>pulseaudio.service</code> to <code>pipewire.service</code> if you're using on PipeWire. | Change <code>pulseaudio.service</code> to <code>pipewire.service</code> if you're using on PipeWire. | ||
Step 4: Run these commands | Step 4: Run these commands: | ||
--- PASTE START --- | --- PASTE START --- | ||
Line 128: | Line 128: | ||
# Add your user to the audio group | # Add your user to the audio group | ||
Step 5: Reboot and | Step 5: Reboot and run espeakup as your user. | ||
There's two downsides to this method: | There's two downsides to this method: | ||
Line 144: | Line 144: | ||
I'm not too sure what this buys compared to using sudo or something to act as root. | I'm not too sure what this buys compared to using sudo or something to act as root. | ||
=== Sharing Speakup between multiple users === | |||
Things would be a lot easier if we could run one speakup instance per user. This is tricky because the Speakup kernel modules don't have concepts of users or sessions. | |||
- speakup fakekey | |||
- logind can proxy/share fds | |||
- have a proxy that sits between speakup and espeak | |||
- send messages to espeakup instances based on current active UID | |||
- during a switch between instances, wait for the current instance to finish talking OR the stop talking control is sent. then start feeding the new instance data | |||
- have a shim that blocks pulseaudio from starting until it has permission, but also don't consume the buffer | |||
i do not like how i'm basically reinventing flow control but poorly | |||
ok so it turns out i was WRONG: you can't share speakup protocol between multiple synths! the protocol is stateful! ie if you tell it to change voice and switch synth the voice change won't be applied. YAY | |||
=== Sharing espeakup output === | |||
An easier solution might be | |||
so this makes the only viable solution to send PCM data from a root espeakup instance. | |||
on top of that this also means i have to modify espeakup to handle some flow control AND output to a buffer instead of the sound card | |||