Local, offline voice-to-clipboard dictation for Sway / Wayland. Press a shortcut, speak, press again — your speech is transcribed on-device with whisper.cpp and dropped straight into the clipboard, ready to paste anywhere (an editor, a terminal, an AI coding CLI).
No cloud, no API keys, no account. Your voice never leaves the machine.
Built to dictate long, detailed prompts and code-review feedback instead of typing them word by word.
- Toggle dictation — one keybinding starts recording, the same one stops it, transcribes, and copies the text to the clipboard.
- 100% local — whisper.cpp on CPU, or on the GPU via Vulkan.
- Automatic GPU/CPU selection — uses the discrete GPU when on AC power (fast), falls back to the CPU on battery so the dGPU stays asleep.
- Bluetooth-safe — always records from the internal mic, so Bluetooth headphones stay in high-quality A2DP and your music is never interrupted (grabbing the BT mic would force the HFP "call" profile).
- Automatic silence trimming — long thinking pauses are removed with ffmpeg before transcription, so pauses never pollute the text and long clips are faster.
- Text-only history — every dictation is saved as a small
.txt(timestamped); the audio is discarded, so nothing bloats your disk. - Searchable history — a floating
fzfwindow (with a live preview of each transcript) lets you recover and re-copy any past dictation. - Clean notifications — a single notification card updates in place (recording → transcribing → copied) and dismisses itself.
┌──────────── $mod+Shift+d (toggle) ────────────┐
▼ │
pw-record (internal mic, 16 kHz mono) │
│ stop ─────────────────────────────────────────┘
▼
ffmpeg silenceremove ──► whisper.cpp ──► wl-copy (clipboard)
(GPU on AC / CPU on battery) │
▼
~/.local/share/voz-dictado/historial/ (text history)
- A wlroots compositor (developed on Sway) +
wl-clipboard(wl-copy). - PipeWire (
pw-record,pw-cli). - whisper.cpp built locally, plus a
ggml model (defaults to
small). ffmpeg(silence trimming),fzf(history picker), a notification daemon such asmako.- Optional GPU: whisper.cpp built with
-DGGML_VULKAN=ON.
On Arch:
sudo pacman -S wl-clipboard pipewire ffmpeg fzf mako
# GPU (optional): vulkan-headers shaderc spirv-headers + build whisper.cpp with -DGGML_VULKAN=ONgit clone https://github.com/anycodef/whisperclip
cd whisperclip
./install.sh # symlinks bin/* into ~/.local/binThen build whisper.cpp and fetch a model:
git clone https://github.com/ggerganov/whisper.cpp ~/.local/src/whisper.cpp
cmake -S ~/.local/src/whisper.cpp -B ~/.local/src/whisper.cpp/build -DCMAKE_BUILD_TYPE=Release
cmake --build ~/.local/src/whisper.cpp/build -j
sh ~/.local/src/whisper.cpp/models/download-ggml-model.sh smallFinally, add the Sway snippet (see sway/config.snippet) to
~/.config/sway/config and reload.
| Shortcut | Action |
|---|---|
$mod+Shift+d |
Start recording · press again to stop, transcribe and copy |
$mod+Ctrl+h |
Floating history picker (search + preview → copy) |
From a terminal:
voz-historial # list past dictations
voz-historial pick # fuzzy picker (also bound to $mod+Shift+h)
voz-historial <timestamp> # copy a specific transcript to the clipboardA few constants live at the top of bin/voz-dictado:
MODEL— path to the ggml model (swapsmallforbase/mediumto trade speed for accuracy).DGPU_CTRL— the discrete GPU's sysfs power-control path. Adjust the PCI address (0000:01:00.0) to your machine (lspci | grep -i vga).- Language is set to Spanish (
-l es); change it in thewhisper-clicall.
MIT — see LICENSE.