Claude Code has built-in voice dictation. You enable it with /voice, hold the spacebar, and speak your prompt instead of typing it. It works on Linux, it is tuned for coding vocabulary, and it does not eat into your token limits.

It also fails in a handful of specific ways on Linux that are not obvious from the error messages, and it stops at the edge of the CLI. This guide covers both: getting /voice running properly on a Linux desktop, and what to do about the 80% of your keyboard day that happens outside a Claude Code session.

The short version



That last row is the one most people find out the hard way.

Enabling /voice on Linux

Run /voice inside a Claude Code session. On first run it does a microphone check and tells you which mode it started in:

/voice

Voice mode enabled (hold). Hold space to record.

Dictation language: en (/config to change).

There are two modes and they behave differently enough to matter.

Hold mode is push-to-talk and is the default. You hold Space, the footer shows a keep holding prompt during a short warmup, then listening. Release to stop. Your words appear in the prompt as you speak, dimmed until the transcript finalises. Because Claude Code detects a held key by watching for rapid key-repeat events from your terminal, there is always a brief warmup before recording starts.

Tap mode (/voice tap) toggles: tap once to start, tap again to stop and send. No warmup. Claude Code submits automatically if the transcript is at least three words long, so a stray tap will not fire off a one-word prompt.

The setting persists across sessions. You can also set it directly rather than running the command each time:

{

"voice": {

"enabled": true,

"mode": "tap"

}

}

Add "autoSubmit": true to that object if you want hold mode to send the prompt on key release rather than waiting for Enter.

One detail worth knowing: transcription is tuned for development vocabulary. Terms like regex, OAuth, JSON and localhost come back correctly, and your current project name and git branch are passed in as recognition hints automatically. That is a meaningful accuracy difference versus general-purpose dictation, which reliably mangles library names.

Fixing the Linux-specific failures

Audio recording uses a built-in native module on Linux. When that module cannot load, Claude Code falls back to arecord from ALSA utils or rec from SoX. Most Linux problems trace back to that fallback chain.

"Voice mode requires SoX for audio recording"

The native module did not load and neither fallback is installed.

# Debian, Ubuntu, Mint, Pop_OS

sudo apt install sox

# Fedora

sudo dnf install sox

# Arch

sudo pacman -S sox

alsa-utils works as an alternative if you would rather have arecord.

"SoX could not open an audio capture device"

SoX is installed, but the machine has no capture device. This is what you see on a headless box, inside a container, or on a VM with no audio passthrough. There is no configuration fix. Voice dictation needs a real microphone on the machine running Claude Code.

Older Claude Code builds reported this as a missing-SoX error even when SoX was present, which sent a lot of people round in circles. Check claude --version before you debug further.

WSL: SoX installs but still cannot record

WSLg routes audio through PulseAudio rather than an ALSA device, and a plain sox install only pulls in the ALSA backend. There is no /dev/snd to record from, so it fails silently in a confusing way.

sudo apt install sox libsox-fmt-pulse

WSLg itself is required. It ships with WSL2 installed from the Microsoft Store. On WSL1 there is no path to make this work, so run Claude Code natively on Windows instead.

Holding Space does nothing

Watch the prompt input while you hold. Two different failures look identical:

  • Spaces keep accumulating. Voice dictation is off. Run /voice hold.

  • One or two spaces appear, then nothing. Dictation is on but hold detection is not triggering. Hold mode depends on your terminal emitting key-repeat events, so it cannot work if key repeat is disabled at the OS level. Some tiling WM and kiosk setups disable it. Switch to /voice tap, which has no key-repeat requirement.

"Voice mode requires a Claude.ai account"

You are authenticated with an API key or a third-party provider. The speech-to-text service is only available on Claude.ai authentication, and is unavailable when Claude Code is pointed at an Anthropic API key directly, Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry. Run /login to sign in with a Claude.ai account.

If your organisation has a policy turning voice off, you will see a different message and there is nothing to fix locally.

Rebinding the key

The dictation key is voice:pushToTalk in the Chat context. Edit ~/.claude/keybindings.json:

{

"bindings": [

{

"context": "Chat",

"bindings": {

"meta+k": "voice:pushToTalk"

}

}

]

}

A modifier combination starts recording on the first keypress with no warmup, which makes hold mode feel considerably better. Avoid binding a bare letter key in hold mode: hold detection relies on key repeat, so the letter types into your prompt while it warms up.

Where /voice stops

This is the part the setup guides skip, and it is the reason most developers end up running something alongside it.

/voice does one job well: turning speech into the prompt you are sending Claude Code in this session. The boundaries are hard ones.

No SSH. Voice dictation needs a local microphone and does not work in remote environments, including Claude Code on the web and SSH sessions. If your actual workflow is a laptop driving a dev box over SSH, which describes a lot of Linux developers, /voice is unavailable in the place you do the work. Same limitation in the VS Code extension for Remote-SSH, Dev Containers and Codespaces: the extension runs on the remote host and the microphone is on yours.

Nothing outside the session. The prompt is the fast part of the loop. What is still typed:

  • the commit message that explains the diff the agent just produced

  • the PR description for whoever reviews the branch

  • the reply to the review comment in GitHub or GitLab

  • the Linear or Jira ticket the agent just unblocked

  • the README or internal doc that should have been updated

  • the Slack message telling the team it shipped

  • prompts to every other AI tool you have open

None of that is a Claude Code prompt, so none of it is covered.

Two-minute recording cap and a 15-second silence timeout. Fine for prompts, not for dictating a long design doc.

Adding system-wide dictation on Linux

Here the Linux tax shows up properly. The commercial dictation market is macOS-first and Windows-second. As of late 2026, Wispr Flow, Willow Voice, Superwhisper, VoiceInk, Voibe and most of the rest ship no Linux build at all. Wispr Flow's own documentation states plainly that Flow is Mac and Windows only with no native Linux application.

That leaves three realistic routes.

Open source, local, DIY

nerd-dictation, Handy, Vocalinux, Voxtype and whisper.cpp wrappers all run locally and cost nothing. They are genuinely good if you enjoy the assembly. The honest trade-offs: model management, accuracy that varies a lot by model size, and the Wayland problem below. Several of the widely recommended projects are unmaintained, which is worth checking before you commit a weekend.

Browser-based

The Web Speech API works in Chromium on Linux and sidesteps text injection entirely, because the text lands in a browser field. Useful for occasional capture, useless for your terminal.

A commercial tool that actually ships for Linux

Voca is one of the few. Native Linux builds alongside macOS and Windows, one system-wide hotkey, text lands at your cursor wherever the cursor is. That includes your terminal, which means it works inside an SSH session: the dictation runs on your local machine and injects into the focused window, so the remote shell just receives keystrokes. That covers the case /voice cannot.

The relevant specifics: $6 a month flat or $0.10 an hour pay-as-you-go, 0.4 second median latency end to end, and audio deleted the instant transcription completes with no retention toggle to remember. For anyone dictating into private repos, that last point is the one that matters. There is a browser demo with no install and a free tier of five hours a month with no card.

Being straight about it: Voca has no SOC 2 report or HIPAA BAA, and no mobile app yet. If procurement is going to ask for compliance paperwork, it is the wrong tool and you should stay on something certified.

The Wayland caveat, briefly

Any system-wide dictation tool has to inject text into the focused application. On X11 that is xdotool and it is straightforward. On Wayland the compositor restricts synthetic input for security reasons, so tools use ydotool (which needs uinput permissions and drops non-ASCII characters on most layouts), wtype (compositor-dependent), an IBus input method, or a clipboard paste fallback.

Practical implication: test dictation in your actual terminal and your actual editor before you decide a tool works. A tool that types fine in a GTK text box can silently do nothing in a terminal with bracketed paste mode on. This applies to every option above, not just one of them.

A realistic voice-first loop on Linux

What this looks like when both halves are in place:

  1. Hold Space in Claude Code. Describe the change. Release. The agent works.

  2. Hotkey in your terminal. Dictate the commit message. Enter.

  3. Switch to the browser. Hotkey. Dictate the PR description.

  4. Hotkey in Slack. Tell the team it is up.

  5. Back to Claude Code. Hold Space. Next change.

Same hand, same modifier key, all the way through. The keyboard's job narrows to navigation and quick fixes, and everything that is prose becomes speech. That is the actual productivity delta, and it is much larger than the prompt-only version of it.

FAQ

Does Claude Code voice dictation work on Linux?

Yes. Audio recording uses a native module on Linux, with arecord or SoX as fallbacks. If you hit an error, install sox via your package manager and retry /voice.

Does /voice work over SSH?

No. Voice dictation requires a local microphone and is not available in remote environments including SSH sessions and Claude Code on the web. A system-wide dictation tool running on your local machine does work here, because it injects text into whatever window has focus.

Does voice dictation use Claude tokens?

No. Transcription does not consume messages or tokens and does not count toward the limits shown in /usage.

Is my audio processed locally?

No. Claude Code streams recorded audio to Anthropic's servers for transcription. If local-only processing is a hard requirement, you need an offline tool such as a whisper.cpp wrapper.

Why does holding Space just type spaces?

Voice dictation is off. Run /voice hold. If one or two spaces appear and then nothing happens, dictation is on but your terminal is not sending key-repeat events. Use /voice tap instead.

Can I use voice dictation in the Claude Code VS Code extension?

Yes, with the same Claude.ai account requirement. It is unavailable in VS Code Remote sessions, including SSH, Dev Containers and Codespaces.

Can I dictate in a language other than English?

Yes. Dictation follows the language setting and supports around twenty languages including German, French, Spanish, Japanese, Czech and Ukrainian. Set it in /config. If your language is not on the list, /voice falls back to English and warns you.

What is the best dictation tool for Linux developers?

For prompts inside Claude Code, /voice is already the right answer and it is free. For everything else, the shortlist on Linux is short: open source local tools such as Handy or nerd-dictation if you want offline and do not mind setup, or Voca if you want a maintained commercial app with one hotkey across every application. Most commercial competitors do not ship a Linux build.

The summary

Getting /voice working on Linux is usually one package install and knowing which mode to use. Getting a genuinely voice-first workflow takes one more piece, because /voice is scoped to the Claude Code prompt by design and the prompt is the part that was already fast.

If you are on Ubuntu, Fedora, Arch or Pop_OS and you want voice for the rest of it, the market is thin. Voca runs on Linux, pairs with /voice rather than replacing it, and there is a browser demo if you want to feel the latency before installing anything. More on how the two fit together on the Claude Code page.