A push-to-talk voice input tool for Claude Code and terminal workflows. Hold a hotkey, speak, release — your speech is transcribed locally via Whisper and pasted into the focused input.
- Push-to-talk: Hold a hotkey to record, release to transcribe
- Local transcription: Uses Whisper.cpp for fast, offline speech-to-text
- No cloud dependencies: Everything runs locally on your machine
- Auto-paste: Transcribed text is automatically pasted into the active window
- Daemon mode: Runs in the background, ready whenever you need it
- Cross-platform: Works on macOS, Linux, and Windows
- Configurable: Choose model size (tiny/base/small for speed vs accuracy)
- Rust 1.70+ (install from rustup.rs)
- A microphone
- System audio libraries (see below)
# Ubuntu/Debian
sudo apt-get install libasound2-dev pkg-config
# Fedora
sudo dnf install alsa-lib-devel
# Arch
sudo pacman -S alsa-libNo additional dependencies required (uses CoreAudio).
No additional dependencies required (uses WASAPI).
Once published to crates.io (recommended):
cargo install claude-code-voiceOr install directly from git:
cargo install --git https://github.com/trssantos/claude-code-voiceNote: On Linux, install system dependencies first:
# Ubuntu/Debian
sudo apt-get install libasound2-dev pkg-configThis will compile and install the binary to ~/.cargo/bin/ automatically.
Once merged to main branch:
curl -sSL https://raw.githubusercontent.com/trssantos/claude-code-voice/main/install.sh | bashCurrently on feature branch:
curl -sSL https://raw.githubusercontent.com/trssantos/claude-code-voice/claude/voice-input-tool-zC4OD/install.sh | bashThis script will:
- Detect your OS and install system dependencies
- Install Rust if not present
- Build and install the tool
- Add it to your PATH
git clone https://github.com/trssantos/claude-code-voice.git
cd claude-code-voice
./install-deps.sh # Install system dependencies
cargo build --release
sudo cp target/release/claude-code-voice /usr/local/bin/First time setup - download a Whisper model (base is recommended):
claude-code-voice download baseAvailable models:
tiny: Fastest, least accurate (~75MB)base: Good balance of speed and accuracy (~142MB) recommendedsmall: Better accuracy, slower (~466MB)medium: High accuracy, much slower (~1.5GB)large: Best accuracy, very slow (~2.9GB)
# Start with default hotkey
claude-code-voice start
# Or customize the hotkey (macOS: use super for Command ⌘)
claude-code-voice start --hotkey "super+shift+v"
# For debugging, run in foreground
claude-code-voice start --foregroundDefault hotkeys:
- macOS:
Command ⌘ + Shift + V - Linux/Windows:
Ctrl + Shift + Space
Custom hotkey examples:
# macOS
claude-code-voice start --hotkey "super+shift+r" # ⌘+Shift+R
# Linux
claude-code-voice start --hotkey "ctrl+alt+v"
# Windows
claude-code-voice start --hotkey "ctrl+shift+v"- Focus on any text input (terminal, editor, browser, etc.)
- Press and hold your hotkey (e.g.,
⌘+Shift+Von Mac) - Speak your text
- Release the hotkey
- Your speech will be transcribed and pasted automatically
claude-code-voice stop# Start the daemon (runs in background)
claude-code-voice start
# Start with custom hotkey
claude-code-voice start --hotkey "ctrl+alt+v"
# Start with different model
claude-code-voice start --model small
# Start in foreground (for debugging)
claude-code-voice start --foreground
# Stop the daemon
claude-code-voice stop
# Check daemon status
claude-code-voice status
# Download a model
claude-code-voice download baseHotkeys are specified as modifier keys plus a main key, separated by +:
Examples:
super+shift+v # ⌘+Shift+V on macOS
ctrl+shift+space # Ctrl+Shift+Space on Linux/Windows
ctrl+alt+r # Ctrl+Alt+R
alt+v # Alt+VSupported modifiers:
ctrlorcontrol- Control keyshift- Shift keyalt- Alt/Option keysuper- Command (⌘) on macOS, Windows (⊞) key on Windows, Super on Linux
Note for macOS users: Use super for the Command (⌘) key, NOT ctrl. The Control key on Mac is different from Command.
Supported keys:
- Letters:
a-z - Numbers:
0-9 - Function keys:
f1-f12 - Special:
space,enter,tab,backspace,escape
To update to the latest version:
curl -sSL https://raw.githubusercontent.com/trssantos/claude-code-voice/claude/voice-input-tool-zC4OD/install.sh | bashThe script will automatically replace the old version.
cargo install --git https://github.com/trssantos/claude-code-voice --branch claude/voice-input-tool-zC4OD --forceThe --force flag replaces the existing installation.
cd /path/to/claude-code-voice
git pull
cargo install --path . --forceNote: After updating, restart the daemon:
claude-code-voice stop
claude-code-voice startModels are stored in ~/.claude-code-voice/models/
Logs (when running as daemon) are in ~/.claude-code-voice/logs/
Make sure you have a working microphone connected and configured as the default input device.
macOS users: Make sure you're using super for the Command (⌘) key, NOT ctrl:
# ✅ Correct - use super for Command key
claude-code-voice start --hotkey "super+shift+v"
# ❌ Wrong - ctrl on Mac is NOT the Command key
claude-code-voice start --hotkey "ctrl+shift+v"Debug hotkey detection:
- Run in foreground mode with debug logging:
RUST_LOG=debug claude-code-voice start --foreground
- Press your hotkey - you should see "Hotkey pressed!" in the logs
- If you see no events, the hotkey isn't being detected (try a different one)
Common issues:
- Another application is using the same hotkey (check system preferences)
- System shortcuts conflict (macOS: System Preferences → Keyboard → Shortcuts)
- Try a different hotkey combination
- On Linux, you may need to run with elevated privileges for global hotkeys
- Make sure the application is actually running (
claude-code-voice status)
Use a smaller model:
claude-code-voice stop
claude-code-voice start --model tinyThe tool simulates Ctrl+V (or Cmd+V on macOS) to paste. Make sure:
- The target application supports standard paste shortcuts
- The application has focus when you release the hotkey
When running as a daemon:
tail -f ~/.claude-code-voice/logs/stdout.log
tail -f ~/.claude-code-voice/logs/stderr.logWhen running in foreground mode:
claude-code-voice start --foregroundcargo testcargo build --releaseRun in foreground with verbose logging:
RUST_LOG=debug claude-code-voice start --foregroundThe tool consists of several modules:
audio.rs: Captures audio from the microphone using cpaltranscription.rs: Transcribes audio using Whisper.cpp via whisper-rshotkey.rs: Handles global hotkey registration and eventsclipboard.rs: Manages clipboard and paste simulation via enigodaemon.rs: Manages background process lifecyclemodel.rs: Downloads and manages Whisper modelsconfig.rs: Configuration management
Model performance on typical hardware (approximate):
| Model | Size | Speed (real-time factor) | Quality |
|---|---|---|---|
| tiny | 75 MB | 32x faster | Good |
| base | 142 MB | 16x faster | Better |
| small | 466 MB | 6x faster | Great |
| medium | 1.5 GB | 2x faster | Excellent |
| large | 2.9 GB | 1x (real-time) | Best |
Real-time factor: How much faster than real-time the transcription runs. 32x means 1 second of audio transcribes in ~30ms.
Want to make this available via brew install, apt install, etc.?
See PUBLISHING.md for detailed instructions on publishing to:
- crates.io (Rust) - Easiest, takes 5 minutes
- Homebrew (macOS/Linux)
- APT (Ubuntu/Debian via PPA)
- AUR (Arch Linux)
- Chocolatey (Windows)
MIT
Contributions welcome! Please open an issue or PR.
- Built with whisper-rs (Rust bindings for Whisper.cpp)
- Uses Whisper.cpp by Georgi Gerganov
- Based on OpenAI's Whisper model