Linux Native Speech-to-Text Voice Typing
Transform your voice into text anywhere on your Linux desktop. Press a hotkey, speak, and your words appear where your cursor is.
- 🎯 Type Anywhere - Works in any application (browsers, editors, terminals)
- 🧠 Whisper AI - OpenAI's state-of-the-art speech recognition
- ⚡ GPU Accelerated - NVIDIA (CUDA) and AMD (ROCm) GPU support
- 🔒 Privacy First - 100% offline, no cloud services
- ⌨️ Global Hotkey - Configurable keyboard shortcut
- 🎚️ Live Streaming - Real-time transcription as you speak
- 🖥️ Multi-Monitor - Scales correctly on multi-monitor setups
- 🔧 System Tray - Minimal, unobtrusive interface
- 📝 Formatted AI - Ollama responses keep lists, paragraphs, and code blocks
- 🚀 Turbo Typing - Optimized text injection (8ms delay) with smart buffering
WhisperLayer supports Ubuntu/Debian, Fedora, Arch, and OpenSUSE.
# Clone the repository
git clone https://github.com/your-username/whisperlayer.git
cd whisperlayer
# Run the installer
bash install.shThe installer detects your distro and installs all dependencies automatically.
If you prefer to do it manually:
# 1. Install System Deps
# Ubuntu/Debian
sudo apt install python3-venv python3-pip python3-gi portaudio19-dev python3-pyqt5 ydotool
# Fedora
sudo dnf install python3 python3-pip python3-gobject portaudio-devel python3-qt5 ydotool
# Arch
sudo pacman -S python-virtualenv python-pip python-gobject portaudio python-pyqt5 ydotool
# For NVIDIA GPU support
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
# For AMD GPU support (ROCm)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm5.6
# Clone and install
git clone https://github.com/your-username/whisperlayer.git
cd whisperlayer
pip install -e .# Run the updater to see available releases
./update.sh
# Or automatically install the latest
./update.sh --latest
# Just list releases without installing
./update.sh --list-only# Interactive uninstall (prompts for each component)
./uninstall.sh
# Remove everything without prompts
./uninstall.sh --all
# Remove all except configuration (keep settings for reinstall)
./uninstall.sh --all --keep-configCommands are triggered by saying "Okay [Action]".
These execute immediately. No end phrase needed.
| Command | Behavior | Description |
|---|---|---|
Okay copy |
Ctrl+C | Copy selected text |
Okay paste |
Ctrl+V | Paste clipboard (or substitute if nested) |
Okay cut |
Ctrl+X | Cut selected text |
Okay undo |
Ctrl+Z | Undo last action |
Okay redo |
Ctrl+Shift+Z | Redo action |
Okay select all |
Ctrl+A | Select all text |
Okay delete |
Ctrl+Backspace | Delete previous word |
Okay backspace |
Backspace | Delete previous character |
Okay new line |
Enter | Insert new line |
Okay enter |
Enter | Press Enter key |
Okay tab |
Tab | Press Tab key |
Okay super |
Super (Windows) | Open Activities/Start |
Okay lock |
Super+L | Lock Screen |
Okay command prompt |
Alt+F2 | Run Command Prompt |
Okay tab |
Alt+Tab | Switch Window (Quick) |
Okay new tab |
Ctrl+T | New Browser Tab |
Okay new window |
Ctrl+N | New Window |
Okay press tab |
Tab | Press Tab Key (Literal) |
These require content and an end phrase.
Valid End Phrases: done, stop, end, finished, complete, over, execute.
Syntax: Okay [Command] [Content] Okay [End]
| Command | Action | Example |
|---|---|---|
Okay search |
Google Search | Okay search what is linux okay done |
Okay google |
Google Search | Okay google weather today okay done |
Okay delta |
Local AI Query | Okay delta write a poem okay done |
Okay raw text |
Type Verbatim | Okay raw text ignore commands okay done |
Note: "Raw Text" mode ignores any command triggers inside it. Use this when dictating text that might contain words like "okay", "copy", etc.
WhisperLayer integrates with Ollama to provide private, local AI assistance.
- Command:
Okay delta [Query] Okay done - Effect: Submits your query to a local LLM and types the response.
- Formatting: Preserves lists, code blocks, and paragraphs automatically.
Setup:
- Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh - Pull a model (Gemma 2B recommended for speed):
ollama pull gemma:2b - Start the server:
ollama serve(or let it run in background)
You can use okay paste inside other commands to use your clipboard content as input.
- Workflow: Copy text -> Say
Okay search okay paste okay done. - Result: Searches Google for the text currently in your clipboard.
- Why? The system detects
okay pasteinside the search command, fetches your clipboard text, and "pastes" it into the search query before executing.
You can chain multiple commands in one breath.
- Example:
Okay new line okay new line okay paste - Result: Inserts two new lines and then pastes text.
From Applications Menu: Search for "WhisperLayer" in your applications menu.
From Terminal:
whisperlayerAs a Service:
systemctl --user start whisperlayer- Click in any text field where you want to type
- Press the hotkey (default:
Ctrl+Alt+F) - Speak - your words are transcribed in real-time
- Stop speaking - after 1.5s silence, text is typed automatically
The tray icon indicates recording status:
- 🔴 Red = Recording
- ⚫ Grey = Idle
Right-click the tray icon → Settings to configure:
| Setting | Description |
|---|---|
| Model | Whisper model size (tiny...turbo) |
| Device | GPU acceleration (auto/cuda/cpu) |
| Hotkey | Custom keyboard shortcut |
| Silence Duration | Auto-stop timeout |
| Input Device | Microphone selection |
| Auto-start | Launch on login |
Create powerful voice macros with the Rich Command Editor:
- Go to Settings -> Custom Commands
- Click Add Command
- Defines your Trigger (e.g. "explain code")
- Use the Macro Editor to build your action
- ⌨️ Key Recording: Click the keyboard icon to record real shortcuts (e.g.
<ctrl+c>). - 🤖 AI Actions: Type
@to select commands like@delta. - 📦 Smart Queries: Commands like
@deltaautomatically add a query box for your prompt. - 🔄 Mixed Mode: Combine text, keys, and AI commands in one macro!
- Example:
Copying selection <ctrl+c>... @delta[Explain this code: {content}]
- Example:
- ⚡ Instant: Executes immediately (Keys, simple text).
- 🛑 Block: Requires an end phrase (e.g. "Okay done") to capture content.
Don't like saying "Okay copy"? rename it!
- Go to Settings -> System Commands
- Click the text box next to any command (e.g., "copy")
- Type your new trigger (e.g., "duplicate")
- Now say "Okay duplicate" to copy!
You can create custom commands that reference or extend other commands.
- Value: Starts with
@followed by the target command trigger.
Examples:
| Trigger | Value | Effect |
|---|---|---|
Okay code |
@delta[write code for {content}] |
Uses AI to write code based on what you say |
Okay dup |
@copy |
"Okay dup" triggers "Okay copy" |
Okay explain |
@delta[explain this code] |
Quick shortcut for AI explanation |
You can also Disable Built-in Commands in the "System Commands" section if they interfere with your dictation.
| Model | VRAM | Speed | Accuracy | Best For |
|---|---|---|---|---|
tiny |
~1GB | ⚡⚡⚡⚡ | ⭐ | Quick notes, low-end hardware |
base |
~1GB | ⚡⚡⚡ | ⭐⭐ | General use |
small |
~2GB | ⚡⚡ | ⭐⭐⭐ | Good balance |
medium |
~5GB | ⚡ | ⭐⭐⭐⭐ | Better accuracy |
large |
~10GB | 🐢 | ⭐⭐⭐⭐⭐ | Best accuracy |
turbo |
~6GB | ⚡⚡⚡ | ⭐⭐⭐⭐ | Recommended |
Ensure you're in the input group:
groups | grep input
# If not present:
sudo usermod -aG input $USER
# Log out and back inCheck CUDA/ROCm is working:
python3 -c "import torch; print(torch.cuda.is_available())"List available microphones:
python3 -c "import sounddevice; print(sounddevice.query_devices())"WhisperLayer works on Wayland but requires ydotool for text injection:
sudo apt install ydotool- OS: Linux (Ubuntu 22.04+, Fedora 38+, Arch)
- Python: 3.10 or newer
- GPU (optional): NVIDIA with CUDA 11.8+ or AMD with ROCm 5.6+
- RAM: 4GB minimum, 8GB+ recommended
- Microphone: Any input device
Contributions are welcome! Please feel free to submit issues and pull requests.
MIT License - see LICENSE for details.
- OpenAI Whisper - Speech recognition model
- PyTorch - Deep learning framework
- GTK - Settings UI framework
Made with ❤️ for the Linux community