Voice-to-text and AI assistant for Linux desktops. Uses OpenAI-compatible APIs (LocalAI, Groq, OpenAI) for transcription, chat, vision, and TTS.
- Dictation (F3): Speech-to-text using Whisper.
- AI Chat (F4): Context-aware Q&A.
- Smart Rewrite (F7): Highlight text, speak to rewrite.
- Vision (F8): Screenshot analysis.
- Pin Chat (F9): Toggle chat overlay pin mode.
- TTS (F10): Toggle text-to-speech for AI responses.
- Linux with Wayland (Hyprland, GNOME, KDE, Sway)
- Python 3.10+
- Wayland tools:
wl-clipboard,wtype,grim - XDG Desktop Portal with GlobalShortcuts support
-
Clone:
git clone https://github.com/Dianjeol/LinuxWhisper.git cd LinuxWhisper -
Install dependencies:
# Arch sudo pacman -S wl-clipboard wtype grim xdg-desktop-portal-hyprland # Debian/Ubuntu sudo apt install wl-clipboard wtype grim -
Run setup:
./setup.sh
Create .env file:
OPENAI_API_BASE=http://localhost:8080/v1 # LocalAI, or your API endpoint
OPENAI_API_KEY=your_key # or "unused" for LocalAI
# Optional model overrides
MODEL_CHAT=gpt-4
MODEL_VISION=gpt-4-vision-preview
MODEL_WHISPER=whisper-1
MODEL_TTS=tts-1
LocalAI setup: See https://localai.io for running models locally.
Groq: Get free key at https://console.groq.com, set OPENAI_API_BASE=https://api.groq.com/openai/v1
LinuxWhisper uses D-Bus GlobalShortcuts portal for Wayland-native hotkeys.
-
Ensure the portal is running:
systemctl --user status xdg-desktop-portal-hyprland -
Add keybindings to
~/.config/hypr/hyprland.conf:# LinuxWhisper shortcuts bind = , F3, global, :linuxwhisper-dictation bind = , F4, global, :linuxwhisper-ai bind = , F7, global, :linuxwhisper-ai_rewrite bind = , F8, global, :linuxwhisper-vision bind = , F9, global, :linuxwhisper-pin bind = , F10, global, :linuxwhisper-tts -
Reload config:
hyprctl reload
uv run linuxwhisper
Hotkeys (configured via Hyprland global dispatcher):
| Key | Action |
|---|---|
| F3 | Dictation (text at cursor) |
| F4 | AI Chat (response at cursor) |
| F7 | Rewrite (select -> hold -> speak -> release) |
| F8 | Vision (screenshot + AI) |
| F9 | Pin/Unpin chat overlay |
| F10 | Toggle TTS / Mute |
Settings: Click the gear icon in the chat or use "Settings" in the System Tray.
- D-Bus GlobalShortcuts: Wayland-native hotkey registration via XDG portal
- Clipboard:
wl-copy/wl-pastefor Wayland - Keyboard simulation:
wtypefor Wayland - Screenshots:
grimfor Wayland - UI: GTK3 + WebKit2 for overlays