LinuxWhisper

Hold a shortcut, speak, paste: offline dictation for Linux.

Role
Developer · Solo
Period
Apr 2026 – Jun 2026
Stack
Rust · Python · faster-whisper · Tauri · React · D-Bus · PipeWire · Wayland
Runs on
Local only, no cloud
Code

The repository is being prepared for public release on GitHub.

At a glance

Problem
Wayland desktops have no reliable system-wide dictation: global shortcuts, microphone capture, and typing into the active window all differ per desktop.
My contribution
Built it end to end: the Rust daemon, the Python speech worker, the shared JSON contracts between them, and the Tauri status window.
Outcome
The hold-to-record flow works on KDE Plasma (Arch Linux), with offline transcription and the transcript on the clipboard; the daemon and worker have more than 50 Rust and Python tests.

Context

Linux desktops on Wayland have no reliable, system-wide way to dictate: global shortcuts, microphone capture, and typing into the active window all differ per desktop. LinuxWhisper proves the smallest useful path first, on Arch Linux with KDE Plasma:

  1. Hold the shortcut, and the daemon starts recording.
  2. Speak, then release, and a local speech model transcribes the recording.
  3. Paste: the transcript is already on the clipboard.

Speech recognition runs on the machine itself, with no cloud service.

What I built

Architecture

  • A Rust daemon owns the whole flow through an explicit state machine: Idle, Recording, Transcribing, PostProcessing, DeliveringOutput, Completed, and Error.
  • It registers a KDE global shortcut through KGlobalAccel over D-Bus and records the microphone through PipeWire.
  • A persistent Python worker runs faster-whisper and exchanges JSON with the daemon over stdin and stdout.
  • A Tauri 2 and React window shows the daemon's live state from the status file it writes.

Execution

  • Delivered transcripts to the Wayland clipboard through wl-copy, behind a timeout.
  • Kept failures contained: a failed recording returns the daemon to Idle, and a failed clipboard write reports the error while keeping the transcript preview.
  • Cleaned up after crashes: on startup, the daemon removes recordings left behind by one that died mid-recording.

Scope

LinuxWhisper is a prototype built milestone by milestone, and the core hold-to-record flow works on the target machine. Typing straight into the focused field, auto-paste, a settings screen, transcript history, and desktops other than KDE are not built yet.

Decisions and trade-offs

  1. Clipboard delivery firstover typing the text straight into the focused fieldInserting text into the active window is desktop-specific and fragile on Wayland. A dependable clipboard path proves the whole flow, from shortcut to transcript, before taking that on.cost · You paste the transcript yourself. Direct insertion and auto-paste are out of scope for now.
  2. KDE Plasma on Wayland only, for nowover broad Linux desktop supportGlobal shortcuts, microphone capture, and clipboard behavior all differ per desktop and are easy to get wrong. Targeting one desktop made it possible to get the smallest useful path reliable on real hardware first.cost · GNOME and other desktops are not supported yet.
  3. A separate Python process for speech recognition, over JSON on stdin and stdoutover running speech recognition inside the Rust daemonfaster-whisper is a Python library, and a separate worker keeps the speech engine replaceable: the daemon depends only on the JSON contract, which shared schemas define for both sides. The worker stays running between recordings and warms its model up in the background.

Results

  • The hold-to-record flow works end to end on KDE Plasma (Arch Linux), fully offline
  • About 1.1 s from releasing the shortcut to text on the clipboard, for a 1.6-second recording with the base model on CPU (a check on the target machine)
  • More than 50 Rust and Python tests across the daemon and the speech worker

What I learned

Getting one small path reliable on one desktop taught me more than designing for every desktop would have. Most of the work wasn't speech recognition. It was everything around it: Wayland's rules for shortcuts and the clipboard, recovering from a crash mid-recording, and keeping a slow model from blocking the daemon. Putting a JSON contract between the Rust daemon and the Python worker paid off early. I could test each side on its own, and the speech engine can change without the daemon noticing.