Claude Code's /voice only works when the machine running Claude Code has its own microphone. That rules out SSH, Dev Containers, Codespaces and WSL1. It also rules out the VS Code extension in any Remote window, including WSL. WSL2 does work on recent versions, if WSLg is set up.

Some setups can't use /voice at all. For those, the fix is to dictate on your own computer and let a dictation app type into the terminal window. The remote side just sees typing. This guide shows what works where, and how to set it up.

"Voice mode is not supported in WSL": what the error means

Older versions of Claude Code blocked voice in every WSL setup with this message:

Voice mode is not supported in WSL (Windows Subsystem for Linux) because audio devices are not available. To use voice mode, run Claude Code in native Windows instead.

Users showed in GitHub issue #32497 that WSL2 can record audio through WSLg. WSLg is the part of WSL2 that runs Linux GUI apps and passes sound through from Windows. Claude Code 2.1.78 then changed this. Its changelog says: "Fixed voice mode not working on WSL2 with WSLg (Windows 11); WSL1/Win10 users now get a clear error".

So if you still see the old message, try these steps in order:

  1. Update Claude Code. Run claude update, then claude --version. You need 2.1.78 or later.

  2. Check your WSL version. In PowerShell, run wsl -l -v. The VERSION column must say 2. WSL1 can't record audio.

  3. Check WSLg is there. Inside WSL, run ls /mnt/wslg. If the folder is missing, update WSL from the Microsoft Store with wsl --update.

  4. Install the right audio tools. If you see Voice mode could not find a working audio recorder in WSL, run sudo apt install sox libsox-fmt-pulse. Installing sox alone isn't enough, because WSL has no ALSA sound device for it to use.

  5. Run /voice again.

If you are stuck on WSL1, the Claude Code voice docs say to run Claude Code in native Windows instead. If you want to stay in WSL1, use a dictation app on Windows, as shown below.

Where else /voice won't run

The voice docs list a "local microphone" as a requirement. They say voice dictation "does not work in cloud sessions or SSH sessions".

The VS Code extension has its own limit. The docs say it "is not available in VS Code Remote sessions, including SSH, Dev Containers, and Codespaces". At the time of writing, this also covers Remote - WSL windows, even though WSL runs on the same PC. GitHub issue #97939 asks Anthropic to allow it, and it is still open.

The error messages you may see in these setups include:

  • Voice mode requires a microphone, but SoX could not open an audio capture device — common in containers and on servers.

  • Voice input is failing repeatedly and has been paused — Claude Code gave up after 3 failed recordings in 10 seconds.

  • No mic button in the VS Code extension — you are in a Remote window.

Why remote sessions can't reach your microphone

Your microphone is plugged into your laptop. Claude Code, in these setups, runs somewhere else: on a server, in a container, or in a cloud machine.

An SSH connection carries text in both directions. It does not carry sound. A container has no sound card unless someone adds one. So when Claude Code asks for audio, there is nothing to record.

But one thing is always on your machine: the terminal window. Every key you press in that window travels to the remote machine as typed text. That is the gap a dictation app can use.

The fix: dictate on your machine, type into the remote terminal

A system-wide dictation app records your voice on your own computer. It turns your speech into text, then types that text into whatever window has focus. If that window is a terminal connected to WSL, a server or a container, the text goes there like normal typing. Claude Code never knows a microphone was involved.

You have a few choices:

  • Built-in dictation. Windows has Voice Typing (Win + H) and macOS has Dictation. Both are free, so try them first. They often get code words and file names wrong.

  • A cloud dictation app. This is what we build: Voca (usevoca.net). It runs on Windows, macOS and Linux, and you pay for the hours of audio you use. It is not the free, offline Voca app from VocaHQ, which is a different product.

Voca types the text as keystrokes, one character after another. It does not paste with a keyboard shortcut. This matters in terminals, because the paste shortcut is different in each one (Ctrl + V, Ctrl + Shift + V, right-click). Typed text works the same everywhere. Voca never presses Enter for you, so you can check the prompt before you send it. It also copies the text to your clipboard as a backup.

How to set up voice for Claude Code in WSL

This works for WSL in Windows Terminal and for the VS Code terminal attached to WSL.

  1. Create a free account on usevoca.net. You get 5 hours of transcription a month without a card.

  2. Install Voca on Windows, not inside WSL. The app needs to run where your microphone is. Download links are on the Voca for Claude Code page.

  3. Sign in and allow microphone access when Windows asks.

  4. Check the hotkey. The default is Ctrl + Shift + ;. You press it once to start and once to stop. There is nothing to hold down. Avoid keys Claude Code uses, such as Space, Esc and Shift + Tab.

  5. Open your WSL terminal and start claude.

  6. Click into the prompt, press the hotkey, speak, and press the hotkey again.

  7. Read the text, then press Enter to send it.

One Windows catch: if your terminal runs as administrator, Voca must run as administrator too. Windows blocks normal apps from typing into admin windows.

SSH, tmux, Dev Containers and Codespaces: what to expect

The same idea works in each case. Install Voca on the computer in front of you, then focus the window you want to type into.

SSH

Connect as usual from Windows Terminal, macOS Terminal, iTerm2 or any Linux terminal. Start claude on the server and dictate into the window. Each character goes over the connection like normal typing, so a long prompt on a slow link may take a moment to appear.

tmux

Text goes into the active pane, so check which pane has the cursor before you speak. Running tmux inside SSH makes no difference.

Dev Containers

The VS Code window is on your machine, even when the terminal inside it runs in a container. Click into the integrated terminal and dictate there. The VS Code extension's chat box is in a Remote window, so its own mic button is off. The Claude Code CLI in the terminal is the easier path.

GitHub Codespaces

  • In the browser: the terminal is part of a browser tab. Click into it and dictate. Voca types into the browser like any other app.

  • In VS Code desktop: it behaves like a Dev Container. Use the integrated terminal.

Which setup works with what

  • WSL2 with WSLg (CLI): /voice works on 2.1.78 or later, with sox libsox-fmt-pulse installed. Voca works.

  • WSL1: /voice doesn't work. Voca works.

  • VS Code extension in a Remote - WSL window: dictation is off. Voca works in the integrated terminal.

  • SSH: /voice doesn't work. Voca works.

  • tmux on a remote server: /voice doesn't work. Voca works.

  • Dev Container: /voice doesn't work. Voca works.

  • Codespaces in the browser: /voice doesn't work. Voca works.

  • Codespaces in VS Code: /voice doesn't work. Voca works.

If /voice works in your setup, it's a good tool. It's included with Claude.ai plans and doesn't use tokens. It also needs a Claude.ai sign-in, so it won't work with an API key, Bedrock or Vertex. Our guide to Claude Code voice with an API key, Bedrock or Vertex covers that case.

Dictating into other tools in the same terminal

Because Voca just types, it doesn't care what's running in the terminal. The same setup works for:

  • Other coding agents, such as OpenAI's Codex CLI and Google's Gemini CLI.

  • Commit messages, when git commit opens an editor in the terminal.

  • Shell commands. Speech tools are bad at symbols like | and --, so read the command before you press Enter.

Add project names, tool names and odd spellings to Voca's dictionary once, and it spells them your way everywhere. It also works outside the terminal, in your editor, browser and chat apps. If you dictate prompts in Cursor too, see Voca for Cursor users.

On a Linux desktop instead?

If your terminal runs on a Linux machine with its own microphone, there's no remote gap to bridge. That case has its own guide: Claude Code voice input on Linux. For Linux dictation in general, see dictation on Linux.

Frequently asked questions

Does Claude Code voice work in WSL?

Yes on WSL2 with WSLg, from Claude Code 2.1.78. You may need to run sudo apt install sox libsox-fmt-pulse. It does not work on WSL1. The VS Code extension also turns dictation off in Remote - WSL windows. In those cases, a dictation app on Windows can type into the WSL terminal.

Can I use voice mode over SSH?

Not with /voice. The Claude Code docs say voice needs a local microphone and does not work in SSH sessions. A dictation app on your own computer, such as Voca (usevoca.net), can type into the SSH terminal window instead.

Does voice work in Dev Containers or Codespaces?

Claude Code's built-in voice does not. The docs say it isn't available in VS Code Remote sessions, including Dev Containers and Codespaces. You can still dictate into the terminal with an app that runs on your own machine.

How do I dictate into Windows Terminal?

Click into the terminal and use a dictation tool that types into the focused window. Windows Voice Typing (Win + H) is free to try. Voca types text as keystrokes, so it works in any Windows Terminal tab, including WSL, PowerShell and SSH sessions.

Try it on your next prompt

Install Voca on the computer in front of you, open your WSL or SSH terminal, and dictate your next Claude Code prompt. The 5 free hours a month are enough to test it on real work. You can compare plans on the pricing page, or start on the Voca for Claude Code page.