Voice Coding with Claude Code: Speak Your Prompts
Use voice typing with Claude Code to write better prompts faster. Step-by-step setup and real examples inside.
TL;DR: Claude Code works in the terminal and expects detailed natural language prompts. Typing those prompts is slow. Voice dictation lets you give Claude Code richer context in a fraction of the time, resulting in better output and fewer iterations.
The Claude Code Prompt Problem
Claude Code is one of the most powerful AI coding tools available. It can read your entire codebase, edit multiple files, run tests, and execute complex multi-step tasks. But there is a catch: its quality is directly proportional to the quality of your prompts.
And Claude Code runs in the terminal, where typing long, detailed prompts is particularly painful. There is no rich text editor, no easy way to go back and edit the middle of a paragraph, no autocomplete for natural language. Just you, a blinking cursor, and the temptation to keep it short.
So developers write prompts like:
> fix the auth bug
When what they should write is:
> The authentication middleware in src/middleware/auth.ts is returning 401
> for users with valid refresh tokens when their access token has expired.
> The issue is in the verifyToken function around line 45 - it checks the
> access token expiry but doesn't fall through to check the refresh token.
> Fix this by adding refresh token validation before returning 401, and
> add a test case for this scenario in auth.test.ts.
The second prompt saves Claude Code from guessing. It produces the right fix on the first try. But who wants to type all of that in a terminal?
The Solution: Voice + Claude Code
Here is the workflow: you keep Claude Code running in your terminal as usual. When you need to give it instructions, instead of typing, you press your voice shortcut, speak naturally for 15-30 seconds, and your detailed prompt appears in the terminal ready to send.
Setup: Murmur + Claude Code
- Install Murmur if you have not already
- Open your terminal (PowerShell, Windows Terminal, CMD, or any terminal emulator)
- Launch Claude Code as you normally would
- When Claude Code is waiting for input, press Ctrl+Space (Murmur's default shortcut)
- Speak your prompt naturally
- Murmur transcribes and inserts the text at your cursor
- Press Enter to send the prompt to Claude Code
That is it. Murmur uses AI-powered transcription that handles technical terms, file paths, and command names correctly.
Real Examples: Dictated vs Typed
Here are real prompts from my daily workflow, comparing what I would have typed versus what I actually said using voice.
Example 1: Bug Fix
What I would have typed:
fix the login redirect issue
What I said (transcribed by Murmur):
The login page redirects to /dashboard after successful authentication
but it should redirect to the URL the user originally tried to access.
The return URL is stored in the query parameter called 'next' on the
login page URL. Update the login handler in pages/login.tsx to read
this parameter and redirect there after auth, falling back to /dashboard
if no next parameter exists. Also make sure to validate the next URL
to prevent open redirect attacks.
Time to type the first version: 5 seconds. Time to speak the second version: 18 seconds. Time saved on iterations because Claude Code got it right the first try: several minutes.
Example 2: New Feature
What I would have typed:
add rate limiting to the API
What I said:
Add rate limiting to the Express API. Use the express-rate-limit package.
Apply a global limit of 100 requests per minute per IP address. For the
authentication endpoints in routes/auth.ts, apply a stricter limit of
10 requests per minute to prevent brute force attacks. Store the rate
limit counters in Redis using our existing Redis client from lib/redis.ts.
Return a 429 status with a JSON error message that includes a retryAfter
field in seconds. Add the rate limiter as middleware in app.ts before
the route handlers.
Example 3: Refactoring
What I would have typed:
refactor the user service to use the repository pattern
What I said:
Refactor the UserService in services/user.ts to use the repository
pattern. Create a UserRepository interface in repositories/types.ts
with methods for findById, findByEmail, create, update, and delete.
Implement it in repositories/prisma/user.ts using our existing Prisma
client. Update UserService to accept the repository through constructor
injection instead of importing Prisma directly. This will make the
service testable without a database. Update the dependency injection
setup in di/container.ts to wire everything together. Do not change
any of the controller code, just the service layer.
Tips for Speaking Technical Prompts Clearly
Name Files and Paths Explicitly
Claude Code has access to your project structure, but specific paths remove ambiguity.
Say: "Update the authentication middleware in src/middleware/auth.ts" rather than "update the auth middleware."
Say: "The Prisma schema in prisma/schema.prisma" rather than "the database schema."
Describe the Architecture
When asking for multi-file changes, describe the architecture in plain English:
"I want to add a caching layer. Create a CacheService interface, implement it with Redis, inject it into the UserService and ProductService, and add cache invalidation on write operations."
You would never type all of that. But saying it takes ten seconds.
Use "Do Not" Constraints
Explicitly state what Claude Code should avoid. This is easy when speaking but tedious when typing:
"Refactor the error handling but do not change the error response format because the frontend depends on the current structure. Also do not remove any of the existing error codes, just add the new ones."
Reference Patterns in Your Codebase
Claude Code can read your code, so reference existing patterns:
"Create a new API endpoint for orders following the exact same pattern as the products endpoint in routes/products.ts. Same middleware chain, same error handling, same response format. Just swap products for orders and use the OrderService."
Think Out Loud
Unlike typing, voice lets you reason through a problem in real-time:
"Okay so the problem is that this WebSocket connection drops after 30 seconds of inactivity. I think we need a heartbeat mechanism. Let me think... yeah, add a ping/pong system where the server sends a ping every 15 seconds and the client responds with a pong. If the server does not receive a pong within 5 seconds, close the connection and let the client's auto-reconnect logic handle it. The reconnect logic is already in lib/websocket.ts so we just need the server-side ping."
Claude Code is excellent at extracting the actionable intent from this kind of natural reasoning.
Ready to try voice coding?
Try Murmur free for 7 days with all Pro features. Start dictating in any app.
Download for freeWhy Voice Gives More Context to AI Agents
There is a psychological reason voice produces better prompts: speaking has lower friction than typing.
When you type, every word has a cost. You unconsciously edit yourself, cutting details that seem "too long to type." The result is terse, ambiguous prompts.
When you speak, words flow at 150+ words per minute (vs 60-80 for most typists). The cost per word drops dramatically. You include context you would have cut. You mention edge cases you would have skipped. You explain the "why" alongside the "what."
This matters enormously for AI agents. Claude Code can handle a 500-word prompt just as easily as a 10-word prompt. But the 500-word prompt gives it enough context to get the implementation right the first time, while the 10-word prompt forces it to guess.
The equation is simple: Voice removes the cost of context. More context means better AI output. Better output means fewer iterations. Fewer iterations means faster development.
Common Terminal Voice Typing Issues
Long Prompts and Line Wrapping
Some terminals handle long pasted text differently. If you see issues with line wrapping, try using a terminal that handles multi-line paste well (Windows Terminal works great).
Special Characters in Code
If you need to include specific code in your prompt, it is often better to type just that snippet and speak the rest. For example, type the regex pattern, then voice the explanation of what it should do.
Background Noise in the Terminal
If you are in a noisy environment, Murmur's noise cancellation (powered by ChatGPT's processing) handles most ambient noise. But a directional microphone or headset gives the best results.
A Typical Voice + Claude Code Session
Here is what a real 30-minute session looks like:
- Speak: "Look at the test failures in the user module. The tests in tests/user.test.ts are failing on the create user flow. Can you identify what changed recently that broke them?"
- Claude Code investigates, identifies the issue
- Speak: "Okay fix those test failures. The mock for the email service needs to be updated to match the new EmailService interface that we changed last week. Also update any other test files that mock the EmailService."
- Claude Code fixes the tests across multiple files
- Speak: "Run the full test suite and let me know if anything else is failing."
- All tests pass
- Speak: "Great. Now create a commit with a descriptive message summarizing the test fixes."
Four voice prompts. Five minutes of speaking total. A complete debugging and fix session that would have taken much longer with typed prompts.
Conclusion
Claude Code is most powerful when you give it detailed, context-rich prompts. Voice dictation with Murmur removes the friction between your thoughts and the terminal, letting you speak the same way you would explain a problem to a senior colleague.
The result is not just faster input. It is fundamentally better prompts, which lead to better code, fewer iterations, and a more effective AI coding workflow.
If you use Claude Code regularly, try adding voice to your terminal workflow. Start with one session. You will feel the difference immediately.
Ready to try voice coding?
Try Murmur free for 7 days with all Pro features. Start dictating in any app.
Download for freeRelated Articles
voice coding
Agentic Coding by Voice: The Future of Dev Productivity
Why voice is the natural input for AI coding agents like Cursor and Claude Code. Explore the future of development.
voice coding
Write Code Documentation with Voice: Comments, READMEs, and Docs That Don't Suck
Learn how voice dictation makes writing code docs faster. Comments, READMEs, API docs, and docstrings in minutes instead of hours.
voice coding
Voice Coding in 2026: The Complete Guide
Everything you need to know about voice coding in 2026. Tools, setup, tips, and workflows to code faster with your voice.