- Rust 79%
- Nix 21%
| src | ||
| vendor/iced_exdevtools | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| devenv.lock | ||
| devenv.nix | ||
| devenv.yaml | ||
| input.wav | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| models.nix | ||
| package.nix | ||
| README.md | ||
| test.wav | ||
Murmur
Hold-to-talk dictation for Wayland. Hold a key, speak, release, and the transcribed text is pasted into whatever window has focus. While you speak, a small overlay shows the live transcript.
Speech recognition runs locally with whisper.cpp (CUDA).
How it works
- Holding the hotkey (
KEY_VOICECOMMAND) starts recording and shows the overlay. - The transcript streams in and may revise earlier words as more audio arrives.
- On release, a final pass runs, the overlay hides, and the text is pasted with Shift+Insert.
Requirements
- A Wayland compositor with layer-shell support
- Membership in the
inputgroup (to read the hotkey from evdev) wl-clipboardandydotoolonPATH, withydotooldrunning- An NVIDIA GPU and CUDA toolkit to build
Models
Murmur needs two model files. Each is looked up from an environment variable first, then from the default location:
| Model | Env var | Default file in $XDG_DATA_HOME/murmur/models/ |
|---|---|---|
| Whisper (ggml), from whisper.cpp | MURMUR_MODEL |
ggml-small.en-q8_0.bin |
| Silero voice activity detection, from whisper-vad | MURMUR_VAD_MODEL |
ggml-silero-v5.1.2.bin |
The VAD model (under 1 MB) keeps keyboard clicks and other noise away from whisper, which otherwise tends to hallucinate text like "thank you" on them.
Custom vocabulary
Whisper often misspells names it hasn't seen, like project names. List them in MURMUR_VOCAB, comma-separated, and they're included in every prompt so whisper prefers those spellings:
MURMUR_VOCAB="Hekla, heklang, Turnstone" murmur
This biases recognition rather than guaranteeing it, and keeping the list short works best.
Build and run
cargo run --release
Nix
package.nix builds Murmur and bundles both models, wrapped with the runtime tools it needs. Choose the model with the model argument (see models.nix for the options); only the chosen model is downloaded.
pkgs.callPackage ./package.nix { model = "small.en-q8_0"; }
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this work shall be dual licensed as above, without any additional terms or conditions.