Hold-to-dictate voice input for Deadlock on Linux/Proton.
This is a small Linux/X11 utility that records your mic while you hold Left Alt, transcribes the audio with faster-whisper, copies the result to the clipboard, and tries a best-effort Ctrl+V paste into the game chat. If the game blocks synthetic paste, the text stays on the clipboard so a real/manual Ctrl+V still works.
- Hold Left Alt to record.
- Release Left Alt to transcribe.
- Uses
faster-whispersmall.en. - Tries CUDA/float16 first by default.
- Falls back to CPU/int8 if CUDA fails.
- Clears the clipboard at recording start.
- Copies recognized text to a persistent clipboard holder.
- Attempts one
xdotoolCtrl+Vpaste. - Plays short beeps and desktop notifications for feedback.
This version is intentionally Linux/X11 focused. It depends on Linux desktop tools such as:
- PulseAudio/PipeWire Pulse compatibility:
pactl,parec,paplay - X11 input tools:
xinput,xdotool,xmodmap - Desktop notifications:
notify-send - Python/Tk clipboard behavior
It will not run as-is on Windows. The speech-to-text idea is portable, but Windows would need a different hotkey, audio, clipboard, and input backend.
bin/deadlock-dictation-hold-daemon— main Python hold-to-dictate daemon.bin/deadlock-clipboard-holder— small Python/Tk clipboard holder.bin/deadlock-right-alt-to-f20— optional Bash helper to remap Right Alt to F20.bin/deadlock-dictate-toggle— older nerd-dictation toggle version kept for reference.systemd/deadlock-dictation.service— persistent user service.install.sh— Debian/Ubuntu installer and service setup.
Ubuntu/Debian:
git clone https://github.com/KevinPequad/deadlock-linux-dictation.git
cd deadlock-linux-dictation
./install.shThe installer:
- creates a dedicated runtime at
~/.local/share/deadlock-dictation/.venv; - pins the proven
faster-whisper==1.2.1release; - installs the runtime scripts under
~/.local/bin, binding the daemon to the dedicated interpreter and the Tk helper to the verified system interpreter; - replaces any stale service-enable links from an older install;
- starts
deadlock-dictation.serviceand waits for both the Whisper model and X11 input monitor to report ready.
The dedicated venv is intentional. Do not point the service at another app's managed venv (for example, an AI-agent or nerd-dictation environment), because that environment can be replaced and make faster_whisper disappear after an update.
For NVIDIA GPU acceleration, install a CUDA-compatible CTranslate2 stack appropriate for your machine. If CUDA is unavailable, the daemon falls back to CPU/int8.
Run the installer from an active X11 desktop session. For a local :N display,
the installer imports the shell's DISPLAY and XAUTHORITY into the systemd
user manager instead of assuming :0; SSH-forwarded displays are not persisted.
On the first install, startup can take a while if the small.en model must be
downloaded; the installer will wait up to 15 minutes and fail instead of claiming
success before the daemon is ready. Transient lock, clipboard-helper, and audio
state lives in the user's private $XDG_RUNTIME_DIR/deadlock-dictation
directory, with a private cache fallback for direct runs without
XDG_RUNTIME_DIR.
The default mic source is currently set in the script:
MIC = "alsa_input.usb-SteelSeries_SteelSeries_Arctis_1_Wireless-00.mono-fallback"Find your own source with:
pactl list short sourcesThen edit MIC in bin/deadlock-dictation-hold-daemon and rerun ./install.sh.
Optional Whisper overrides for the user service:
systemctl --user edit deadlock-dictation.serviceAdd:
[Service]
Environment=DEADLOCK_WHISPER_DEVICE=cuda
Environment=DEADLOCK_WHISPER_COMPUTE=float16Then restart it:
systemctl --user daemon-reload
systemctl --user restart deadlock-dictation.serviceThe installer starts the user service automatically. Manage it with:
systemctl --user status deadlock-dictation.service
systemctl --user restart deadlock-dictation.service
journalctl --user -u deadlock-dictation.service -fFor a manual foreground run after installation, the installed command already uses the dedicated interpreter:
~/.local/bin/deadlock-dictation-hold-daemonOpen Deadlock chat, hold Left Alt, speak, then release.
- This watches physical X11 key events so synthetic key events do not recursively trigger dictation.
- The script is tuned for one local setup and may need edits for your keyboard and mic names.
- Deadlock/Proton may reject synthetic paste. The clipboard fallback is intentional.
- This does not inspect game memory, inject into the game, or automate gameplay; it is just OS-level dictation and clipboard/paste glue.
MIT