Skip to main content

Local Whisper voice dictation for any app or LLM โ€” push-to-talk, auto-paste, offline.

Project description

voicepaste ๐ŸŽ™

Talk instead of type. Hold a hotkey, say what you want, let go โ€” your words appear instantly in any app.

Works with ChatGPT, Claude, Cursor, Gemini, Copilot, Ollama, or any app on Windows, Mac, and Linux. Runs 100% on your computer. No internet, no API keys, no subscriptions.


What it does

  • Hold a hotkey โ†’ speak โ†’ release โ€” text is typed wherever your cursor is
  • Works inside Claude Code as a /voice command
  • Transcribes your voice using Whisper AI, running locally on your CPU
  • Under 0.5 seconds from when you stop talking to when text appears

Before you start โ€” what you need

You only need three things:

1. Python 3.10 or newer

If you're not sure whether you have it, open PowerShell and type:

python --version

If you see Python 3.10 or higher, you're good. If not, download it free from python.org โ€” make sure to check the box that says "Add Python to PATH" during installation.

2. A microphone

Any microphone works โ€” your laptop's built-in mic, a webcam mic, a USB mic, or a headset. If your computer can make video calls, it will work.

3. An LLM or app to dictate into

VoicePaste works anywhere you can type โ€” ChatGPT, Claude Code, Cursor, VS Code, Notepad, Word, your browser, anything.


Installation โ€” 3 steps

Windows or Mac? The steps are almost identical โ€” just pick the right installer in Step 2.

Step 1 โ€” Download the project

Windows โ€” open PowerShell (search "PowerShell" in your Start menu):

git clone https://github.com/obsoul/voicepaste.git
cd voicepaste

Mac / Linux โ€” open Terminal:

git clone https://github.com/obsoul/voicepaste.git
cd voicepaste

Don't have git? Windows: download from git-scm.com. Mac: run xcode-select --install in Terminal. Linux: run sudo apt install git.

Step 2 โ€” Run the installer

Windows:

powershell -ExecutionPolicy Bypass -File install.ps1

Mac / Linux:

bash install.sh

Linux requires xdotool and xclip for paste support โ€” the installer handles this automatically on Ubuntu/Debian, Fedora, and Arch.

This will:

  • Install all required Python packages (~2 minutes on first run)
  • Download the Whisper AI model to your computer (~75 MB, one time only)
  • Set up the /voice command in Claude Code (if you use it)
  • Create a config file at ~/.voicepaste/config.yaml

Step 3 โ€” Start the background service

The background service keeps the AI model loaded in memory so transcription is fast:

python main.py serve

Keep this window open. You can minimize it โ€” it runs quietly in the background.

That's it. You're ready.


How to use it

Option A โ€” Global hotkey (works in any app)

Open a terminal and run:

python main.py hotkey

Now you can dictate anywhere on your computer:

  1. Click into any text field (ChatGPT, Claude, Cursor, Notepad, Word, browser โ€” anything)
  2. Hold Ctrl + Shift + Space
  3. Speak
  4. Release โ€” your words appear

Note (Windows): The global hotkey requires running PowerShell as Administrator, or enabling Windows Developer Mode. See Troubleshooting if this doesn't work.

Option B โ€” Inside Claude Code (the /voice command)

Open Claude Code, type /voice, and press Enter. VoicePaste will transcribe and paste your words directly into the chat.

/voice

Want more time to speak?

/voice --dur 15

Option C โ€” Quick one-time recording

Don't want the background service? Use this for a single recording:

python main.py once --dur 8

Where text gets pasted

Configure paste_mode in ~/.voicepaste/config.yaml:

Mode What it does
auto Pastes into whatever window is currently focused (works with any app)
claude Focuses Claude Code specifically, then pastes
clipboard Copies to clipboard only โ€” you paste with Ctrl+V / Cmd+V

Default is auto โ€” works universally.


The two pieces explained

VoicePaste has two parts that work together:

Part What it does How to start it
Background service (daemon) Keeps the AI model loaded so transcription is instant python main.py serve
Hotkey listener Detects when you hold/release the hotkey python main.py hotkey

You start both once, minimize the windows, and forget about them.

To start both automatically together:

python main.py serve
# In a second terminal:
python main.py hotkey --autostart

GPU Acceleration (optional)

If you have an NVIDIA GPU, VoicePaste will automatically use it โ€” dropping transcription time from ~0.3s to ~0.03s and unlocking larger, more accurate models.

Check your hardware

python main.py detect

Enable GPU (if not auto-detected)

Step 1 โ€” Install CUDA drivers from nvidia.com/cuda-downloads

Step 2 โ€” Install CUDA Python packages:

pip install nvidia-cublas-cu12 nvidia-cudnn-cu12

Step 3 โ€” Update ~/.voicepaste/config.yaml:

device: cuda
compute_type: float16
model: large-v3   # near-perfect accuracy at GPU speed

Step 4 โ€” Restart the background service: python main.py serve

GPU speed comparison

Model CPU speed GPU speed Quality
tiny ~0.3s ~0.03s Great for everyday speech
base ~2s ~0.08s Better accuracy
small ~4s ~0.15s Strong accuracy
medium too slow ~0.3s High accuracy
large-v3 too slow ~0.8s Best available โ€” handles accents, technical terms

No NVIDIA GPU? The default CPU + tiny setup is already fast. GPU is an enhancement, not a requirement.


Customizing your settings

Your settings live at ~/.voicepaste/config.yaml. Open it with any text editor.

# How accurate vs how fast:
#   tiny   = fastest (~0.5s), still very accurate for most speech
#   base   = a bit slower (~2s), slightly more accurate
#   small  = slower (~4s), more accurate
model: tiny

# Language โ€” "auto" detects it automatically, or set e.g. "en", "fr", "es"
language: auto

# The hotkey to hold while speaking
hotkey: ctrl+shift+space

# Where the text goes after transcription:
#   auto      = paste into whatever app you're typing in  โ† recommended
#   claude    = paste into Claude Code specifically
#   clipboard = just copy to clipboard (you paste with Ctrl+V)
paste_mode: auto

After changing settings, restart the background service for them to take effect.


Troubleshooting

"The hotkey isn't working" (Windows)

The keyboard library needs elevated permissions to intercept global key presses. Try one of these:

Option 1 โ€” Run PowerShell as Administrator: Right-click PowerShell in the Start menu โ†’ "Run as administrator" โ†’ run python main.py hotkey

Option 2 โ€” Enable Windows Developer Mode: Settings โ†’ System โ†’ For Developers โ†’ turn on "Developer Mode" โ†’ restart and try again

"The hotkey isn't working" (Linux)

  • X11: Should work out of the box after install. If not, try running with sudo.
  • Wayland: Global hotkeys have limited support under Wayland. Log out and choose an X11 session at the login screen.
  • Make sure python-xlib is installed: pip3 install python-xlib

"The hotkey isn't working" (Mac)

Mac requires Accessibility permission for the hotkey listener:

  1. Open System Settings โ†’ Privacy & Security โ†’ Accessibility
  2. Click the + button
  3. Add your Terminal app (Terminal, iTerm2, or whichever you use)
  4. Restart the hotkey listener: python3 main.py hotkey

"It's not picking up my voice"

  • Check that your microphone is set as the default input device
  • Try speaking louder or closer to the mic
  • Run python main.py once --dur 5 โ€” if it works, just restart the hotkey listener

"It says 'no speech detected'"

  • Make sure you're speaking during the countdown, not after
  • Check that your mic volume is turned up in system sound settings

"I want to stop everything"

python main.py stop    # stop the background service
# Close the hotkey listener window, or press Ctrl+C

Frequently asked questions

Does my voice get sent to the internet? No. Everything runs on your computer. The Whisper model is downloaded once during install, then runs locally forever.

Does it work on Mac and Linux? Yes โ€” full Mac and Linux support is included. Run bash install.sh on either platform.

Can I use it with ChatGPT / Cursor / Gemini / VS Code? Yes โ€” set paste_mode: auto and it will paste into whatever window you're currently typing in.

How accurate is it? Very accurate for clear speech in English. It handles accents well. Background noise can reduce accuracy โ€” a quiet room or headset helps.

Can I use a different language? Yes โ€” set language: fr (or any language code) in your config, or pass --language fr to the CLI.

Can I make it more accurate? Change model: tiny to model: base or model: small, then restart the background service.


Commands reference

# Start the background service (keep this running)
python main.py serve

# Start the global push-to-talk hotkey
python main.py hotkey

# Start hotkey and auto-launch the background service if needed
python main.py hotkey --autostart

# Record once for 8 seconds (no hotkey needed)
python main.py trigger --dur 8

# Stop the background service
python main.py stop

# Detect your GPU/CPU and see recommended settings
python main.py detect

# Create a fresh config file
python main.py setup

Project layout

voicepaste/
โ”œโ”€โ”€ main.py               โ† Start here โ€” all commands go through this
โ”œโ”€โ”€ SKILL.md              โ† The /voice Claude Code skill definition
โ”œโ”€โ”€ install.ps1           โ† Windows one-click installer
โ”œโ”€โ”€ install.sh            โ† Mac/Linux one-click installer
โ”œโ”€โ”€ config.yaml           โ† Default settings (copy to ~/.voicepaste/)
โ”œโ”€โ”€ requirements.txt      โ† Python packages needed
โ””โ”€โ”€ voicepaste/
    โ”œโ”€โ”€ daemon.py         โ† Background service (keeps AI model loaded)
    โ”œโ”€โ”€ hotkey.py         โ† Push-to-talk hotkey listener
    โ”œโ”€โ”€ recorder.py       โ† Microphone recording
    โ”œโ”€โ”€ transcriber.py    โ† Whisper AI transcription
    โ”œโ”€โ”€ paster.py         โ† Pastes text into the right window
    โ”œโ”€โ”€ client.py         โ† Talks to the background service
    โ””โ”€โ”€ config.py         โ† Loads and saves settings

Contributing

Pull requests are welcome! If you run into a bug or want to suggest a feature, please open an issue.

Ideas for future versions:

  • Wake word activation ("Hey Claude...", "Hey Cursor...")
  • Real-time streaming transcription (words appear as you speak)
  • GUI config editor

License

MIT โ€” free to use, modify, and distribute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voicepaste-0.1.0.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

voicepaste-0.1.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file voicepaste-0.1.0.tar.gz.

File metadata

  • Download URL: voicepaste-0.1.0.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for voicepaste-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2d0a8d2646404ea1bb59ceaadace2aabd5b90afdfde254755ca65297ae08731b
MD5 8c7254c80cf54a5b2e0a440856138f7d
BLAKE2b-256 a1c16d954c81670bd50aba92a5b1f8ba6387c3b2a5b5e8cf9d418cdcdb8a9e59

See more details on using hashes here.

File details

Details for the file voicepaste-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: voicepaste-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for voicepaste-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4139ad63015fe558a04f9667db167e7f31b0695fd31d7bb11ff98bcca3026deb
MD5 5c19ebb748ec660d31aa1a239c09a6d3
BLAKE2b-256 5176822387919c12adc9da7b878562fe11f73943fb9653e4d95156316e985ef8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page