English · Русский
A classic voice-typing app for Windows, like the system-wide dictation hotkey in the
ChatGPT desktop app, but built on the speech recognition inside Claude Code. Claude Code
has /voice dictation, yet only for its own prompt: there is no global hotkey that types
into any window. This utility closes that gap. Press Ctrl+Space in any application,
speak, press again, and the text is pasted where the cursor was.
Under the hood Claude Code only acts as a "dictaphone": a hook intercepts the dictated text, the model never sees it, no tokens are spent. Transcription itself is free and does not count toward subscription limits.
A small AutoHotkey utility, no build, no dependencies.
- Windows 10/11.
- AutoHotkey v2.
- Claude Code 2.1.116 or newer (tap-mode dictation). The
standard installer puts
claude.exein PATH, which is enough; otherwise setclaudeExeindictate.ini. Signed in with a claude.ai account on a Pro/Max/Team/Enterprise plan; dictation is not available with an API key. - A microphone that desktop apps are allowed to use (Windows privacy settings).
- Copy the folder anywhere.
- Double-click
dictate-start.ahk. On the first run a folder dialog asks which Claude profile to dictate with; the default~\.claudeis preselected, so just press OK unless you have several accounts. Then a console with Claude Code opens, a small○ readyindicator appears in a screen corner, a green "H" icon in the tray. - The first time, Claude Code asks in that console whether to trust this folder:
answer Yes. It will not ask again. Once you are comfortable, pick
Claude window: minimizedorhiddenin the tray menu; the choice is remembered.
Exit: right-click the indicator or the tray icon, Exit. The Claude Code console
closes together with the script.
| Key | Action |
|---|---|
| Ctrl+Space | start recording |
| Ctrl+Space again | stop and paste the text into the window you started in |
| Escape while recording | cancel, paste nothing |
Outside of a recording the script does not touch Escape. The clipboard is restored after pasting.
Claude Code stops a recording by itself after 15 seconds of silence and after two minutes;
in both cases the text is pasted automatically. A completely silent recording gives No speech.
The indicator can be dragged with the mouse; the position is remembered. Right-click on it
or on the tray icon opens the menu: profiles (check mark on the current one, click to switch),
console window mode (hidden, minimized, visible), Autostart (check mark = shortcut
dictate-start.ahk.lnk in shell:startup), Reload, Exit.
| Indicator | Meaning |
|---|---|
○ ready |
ready |
↻ updated (yellow) |
ready; Claude Code updated itself in the background, the old version keeps running until Reload |
● REC 1:53 |
recording, countdown to two minutes, last 10 seconds in red |
… process |
recording stopped, waiting for the text |
✓ pasted |
pasted |
✕ ESC |
cancelled |
No speech / No text / No mic / No Claude |
error, see dictate.log |
Everything is in dictate.ini, every key has a comment: hotkeys (AutoHotkey notation,
e.g. ^Space, ^!d, #v), path to claude.exe, window mode, indicator position and
opacity, countdown limits, profiles. On first run the file is created
from dictate.example.ini. After editing, Reload from the menu.
Recognition language: dictate-settings.json, key language (default ru; see the
supported languages).
| File | Role |
|---|---|
dictate-start.ahk |
run this one: picks the profile and starts the core |
dictate-core.ahk |
the core: hotkey, Claude Code window, indicator, pasting. Does not run on its own |
dictate.ini |
settings; created from dictate.example.ini, not committed to git |
dictate-settings.json |
Claude Code settings for the dictation instance: language, tap mode, hook |
hook-grab.ps1 |
the hook: intercepts the prompt, writes it to dictate-out.txt, blocks submission |
dictate.log |
log: hook lines with the recognized text and [ahk] lines from the script |
A profile is a Claude Code config directory (CLAUDE_CONFIG_DIR) with its own login,
recognizable by a .credentials.json inside. default is Claude Code's own ~\.claude.
One account, the usual case. Press OK on the preselected ~\.claude in the first-run
dialog. The launcher starts the core with default, the core leaves CLAUDE_CONFIG_DIR
alone, Claude Code uses ~\.claude. The menu shows Profile: default. Cancel in that
dialog means "do not start"; the question comes back next time.
Several accounts. Pick the profile folder in the first-run dialog. It becomes last
in dictate.ini, its parent folder becomes dir, and every sibling folder with a
.credentials.json shows up in the tray menu. With dir empty the parent is your user
folder, which covers the usual ~\.claude-work, ~\.claude-personal layout.
On every start the launcher takes the first that applies:
- Command-line argument: a config directory or
default. This is how the core restarts itself when you switch profiles from the menu or pressReload. - The
lastkey: the profile used last time. Written automatically. default.
dictate-core.ahkrunsclaude --settings dictate-settings.jsonin a classic console (not Windows Terminal, which ignores keys posted to its window) and posts keys into it withControlSend, without taking the focus.dictate-settings.jsonenables tap-mode dictation and installs aUserPromptSubmithook. The file is passed only to this instance; global Claude Code settings are untouched.hook-grab.ps1receives the submitted prompt, writes it todictate-out.txtand exits with code 2: the prompt is blocked, the model never sees it.- The script waits for the file, pastes the text via the clipboard and restores the old clipboard.
- The real microphone state is read from the Windows registry
(
CapabilityAccessManager\ConsentStore\microphone); otherwise an empty recording cannot be told apart from a running one. The record is keyed by the executable path, and Claude Code's auto-update renames the running binary toclaude.exe.old.<n>without a word, so the path is asked from the running process each time (QueryFullProcessImageName) rather than taken from the settings. When that path stops matching the one seen at start, the script knows Claude Code has updated and turns the indicator yellow.
- Recognition quality is set by Anthropic's server and cannot be influenced. Russian mixed with English terms is recognized poorly. Claude Code has no custom vocabulary.
- Windows only. On macOS the hook scheme works the same, but AutoHotkey has to be replaced by Hammerspoon and posting keys to a window by tmux.
- At most two minutes per recording, a Claude Code limit.
MIT. Not affiliated with or endorsed by Anthropic; Claude is a trademark of Anthropic, PBC.