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 81: | Line 81: | ||
This will cause the speakup kernel modules to load at boot. | This will cause the speakup kernel modules to load at boot. | ||
Step 2: Put this in <code>/etc/udev/ | Step 2: Put this in <code>/etc/udev/rule.d/99-speakup.conf</code> | ||
--- PASTE START --- | --- PASTE START --- | ||
Line 99: | Line 99: | ||
[Unit] | [Unit] | ||
Description=Software speech output for Speakup | Description=Software speech output for Speakup | ||
[Service] | [Service] | ||
Environment="default_voice= ALSA_CARD=" | Environment="default_voice= ALSA_CARD=" | ||
Line 107: | Line 106: | ||
OOMScoreAdjust=-900 | OOMScoreAdjust=-900 | ||
[Install] | [Install] | ||
After=pulseaudio.service | |||
WantedBy=default.target | WantedBy=default.target | ||
--- PASTE END --- | --- PASTE END --- | ||
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 143: | Line 143: | ||
This would have mean that multiple people can privately use a computer, with the exception of one user being able to read root's screen. | This would have mean that multiple people can privately use a computer, with the exception of one user being able to read root's screen. | ||
I'm not too sure what this buys | I'm not too sure what this buys outside using sudo. | ||
=== Sharing espeakup === | |||
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 | |||
=== Sharing Speakup | === Sharing Speakup === | ||
- 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 | |||