diff --git a/README.md b/README.md index 9465314..edfc500 100644 --- a/README.md +++ b/README.md @@ -106,10 +106,25 @@ You also need to install all the dependencies: portal startup script falls back to launching the portals manually.) - fcitx5 - fcitx5-hangul +- wtype (types the transcribed text) +- whisrs-git (AUR; voice dictation daemon, see below) There are probably more, I will update the list next time I'm installing it on a new computer. +Voice dictation +=============== + +The Copilot key (on newer laptops this replaced the right Ctrl key; it +sends SUPER+SHIFT+F23) toggles voice dictation. Press it once to start +recording and again to stop. whisrs transcribes locally with a +whisper.cpp model and types the text at the cursor via wtype, in any +window, including terminals running the dockerized agent harnesses. + +The config lives in ~/.config/whisrs/config.toml and the model in +~/.local/share/whisrs/models/. The daemon runs as the systemd user +service whisrs.service. + License ======= diff --git a/hypr/keybindings.lua b/hypr/keybindings.lua index b45c0bc..b2288ca 100644 --- a/hypr/keybindings.lua +++ b/hypr/keybindings.lua @@ -36,3 +36,8 @@ hl.bind(P.mainMod .. " + F1", hl.dsp.exec_cmd("~/.config/hypr/scripts/cheatsheet hl.bind(P.mainMod .. " + ALT + TAB", hl.dsp.pass({ window = "class:^(com.obsproject.Studio)$" })) hl.bind("F1", hl.dsp.pass({ window = "class:^(com.obsproject.Studio)$" })) hl.bind("F2", hl.dsp.pass({ window = "class:^(com.obsproject.Studio)$" })) + +-- Copilot key (sends SUPER+SHIFT+F23): hold-to-talk voice dictation via whisrs +-- press = start recording, release = stop and transcribe +hl.bind("SUPER + SHIFT + F23", hl.dsp.exec_cmd("whisrs toggle")) +hl.bind("SUPER + SHIFT + F23", hl.dsp.exec_cmd("whisrs toggle"), { release = true }) diff --git a/hypr/shortcuts.txt b/hypr/shortcuts.txt index b919446..69d0442 100644 --- a/hypr/shortcuts.txt +++ b/hypr/shortcuts.txt @@ -2,6 +2,7 @@ │ SUPER + T Open terminal │ │ SUPER + W Close focused window │ │ SUPER + B Open browser │ │ SUPER + M Exit Hyprland │ │ SUPER + E Open file manager │ │ SUPER + V Toggle floating │ +│ Copilot key Voice dictation │ └────────────────────────────────────────────────────┘ │ SUPER + P Pseudo split (dwindle) │ ┌───────────────── Focus Movement ───────────────────┐ │ SUPER + J Toggle split (dwindle) │ │ SUPER + ←/→/↑/↓ Move focus │ │ SUPER + F Toggle fullscreen │