- C++ 77.8%
- Nix 14.8%
- CMake 7.4%
Add pkgsBuildBuild.stdenv.cc to depsBuildBuild so ggml-vulkan can compile its host-side vulkan-shaders-gen tool during cross-compilation. |
||
|---|---|---|
| .github/workflows | ||
| assets | ||
| nix | ||
| protocols | ||
| src | ||
| systemd | ||
| .clang-format | ||
| .clang-tidy | ||
| .envrc | ||
| .gitignore | ||
| CMakeLists.txt | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| README.md | ||
| VERSION | ||
hyprdictate
Streaming dictation into the focused text field on Wayland: words appear as you speak, transcribed locally on your GPU.
Works on compositors with the zwp_input_method_v2 protocol: Hyprland and wlroots-based ones such as sway, river and labwc. It does not work on GNOME or KDE, which don't support that protocol.
This project is written and maintained with AI assistance.
Features
- Types into any text field through the Wayland input-method protocol, without faking key presses
- Streams: settled words are committed as you speak, words still being decided show as a preedit
- Local speech recognition on the GPU through Vulkan, with transcribe.cpp
- The microphone is only open while dictating
Usage
Download a streaming transcribe.cpp model, e.g. nemotron-3.5-asr-streaming-0.6b-Q8_0.gguf from
Nemotron 3.5 ASR Streaming.
Point ~/.config/hypr/hyprdictate.conf at it (assets/example.conf lists every setting, and is installed as share/hypr/hyprdictate.conf):
general {
model = ~/models/nemotron-3.5-asr-streaming-0.6b-Q8_0.gguf
language = en-US
}
Start the daemon with your session, through its systemd user unit:
systemctl --user enable --now hyprdictate.service
and bind a key to toggle dictation, e.g. in Hyprland:
bind = SUPER, D, exec, hyprdictate --toggle
hyprdictate --help lists the options.
Requirements:
- A compositor with
zwp_input_method_v2(Hyprland, sway, river, labwc; not GNOME or KDE), and no other input method running - Apps with
text_input_v3(GTK, foot; Chromium with--enable-wayland-ime) - PipeWire
Installation
Nix
default.nix and the flake export overlays.default and maidModules.default, a
nix-maid module that writes hyprdictate.conf and runs the unit in the graphical session:
maid.sharedModules = [ (import hyprdictate).maidModules.default ];
# per user:
hyprdictate = {
enable = true;
model = ./nemotron-3.5-asr-streaming-0.6b-Q8_0.gguf;
# also: package, language, latency
};
Manual
Dependencies
- wayland, wayland-scanner
- pipewire
- hyprutils, hyprlang, hyprwire, hyprwayland-scanner
- transcribe.cpp, built with
-DTRANSCRIBE_VULKAN=ON -DTRANSCRIBE_BUILD_SHARED=ONand installed
Building
Building is done via CMake:
cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
cmake --build ./build --config Release --target hyprdictate -j`nproc 2>/dev/null || getconf _NPROCESSORS_CONF`
Install with:
cmake --install ./build