# Hyprvoice > **Voice‑powered typing for Wayland/Hyprland desktops** β€” press a global shortcut, speak, and watch words appear in whatever window you're focused on. **🚧 Early Development Status:** This project is currently in early development. Not ready for production use yet. --- ## Why does this hyprvoice exist? Typing is slow, repetitive strain injuries are real. This project aims to give Wayland users a fast, privacy‑respecting alternative that works entirely on their own hardware _or_ any cloud ASR they trust. --- ## Current Implementation Status | Component | Status | Description | | ------------------------- | ------- | ------------------------------------------------------------ | | **Hot‑key daemon** | βœ… Done | Background service with Unix socket IPC for command handling | | **Desktop notifications** | βœ… Done | Recording state changes via `notify-send` | | **Service management** | βœ… Done | Install/remove systemd user service with embedded unit file | | **Live audio capture** | πŸ”„ TODO | PipeWire input with VAD/noise gate | | **ASR backends** | πŸ”„ TODO | Local Whisper or cloud APIs (OpenAI, Deepgram, AssemblyAI) | | **Text injection** | πŸ”„ TODO | `wtype`/`ydotool` keystrokes to focused window | | **Configuration** | πŸ”„ TODO | TOML config file with runtime reload | --- ## QuickΒ Start (Arch / Hyprland) ```bash # 1. Install from AUR (source build) yay -S hyprvoice #Β Β Β or pre‑built binary yay -S hyprvoice-bin # 2. Run the interactive setup helper hyprvoice-install run --backend whispercpp # 3. Enable the user service systemctl --user enable --now hyprvoice.service # 4. Add a key binding in Hyprland conf bind = SUPER, R, exec, hyprvoice toggle ``` --- ## Configuration file (`~/.config/hyprvoice/config.toml`) **Note:** Configuration file support is not yet implemented. This shows the planned format: ```toml [asr] backend = "whispercpp" # whispercpp | openai model = "medium.en.bin" # used if backend = whispercpp api_key = "" # used if backend = openai [vad] threshold = -45 # dBFS hang_ms = 300 [inject] method = "wtype" # wtype | ydotool | clipboard [keybind] # If you don't use Hyprland, set an XDG desktop accelerator here shortcut = "CTRL+ALT+SPACE" ``` All options are documented in the sample config generated by `--init`. --- ## Architecture ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” Unix Socket β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” PCM β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ CLI Client │◄────────────────│ Hot‑key │────────▢│ Audio β”‚ β”‚ (toggle/stop)β”‚ β”‚ Daemon β”‚ β”‚ Capture β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ (hotkeydaemonβ”‚ β”‚ (pipewireβ”‚ β”‚ + bus) β”‚ β”‚ + VAD) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ notify-send β”‚ chunks β–Ό β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Desktop β”‚ β”‚ ASR β”‚ β”‚ Notification β”‚ β”‚ Adapter β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚(whisper/ β”‚ β”‚ openai) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ text β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Inject β”‚ β”‚ (wtype/ β”‚ β”‚ ydotool) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` **Planned Components:** - `cmd/hyprvoice`: CLI with Cobra commands (existing: `serve`, `toggle`, `stop`) - `internal/bus`: Unix socket IPC for daemon communication (βœ… implemented) - `internal/hotkeydaemon`: Background service managing recording state (βœ… implemented) - `internal/notify`: Desktop notifications via `notify-send` (βœ… implemented) - `internal/audiocapture`: PipeWire input with VAD/noise gate (πŸ”„ TODO) - `internal/asr`: ASR backends (Whisper, OpenAI, etc.) (πŸ”„ TODO) - `internal/inject`: Text injection via wtype/ydotool (πŸ”„ TODO) - `internal/config`: TOML configuration with runtime reload (πŸ”„ TODO) Each box will be a Go package inside `internal/` so you can swap implementations without touching public APIs. --- ## Building from Source ```bash git clone https://github.com/leonardotrapani/hyprvoice.git cd hyprvoice # Compile CGO_ENABLED=1 go build -o hyprvoice ./cmd/hyprvoice # Run tests go test ./... ``` **Requires** GoΒ 1.22+, a C compiler, and `pkg-config` with PipeWire headers. --- Contributions welcome! Check the [issues](https://github.com/leonardotrapani/hyprvoice/issues) for good first tasks. --- ## License This project is licensed under the MIT License. See the [LICENSE.md](LICENSE.md) file for details.