Voice Commands to Insert Text Snippets: A Developer's Guide to Hands-Free Boilerplate
How voice commands to insert text snippets work, how to design spoken phrases that don't misfire, and how to set them up with Talon, macOS Voice Control, Windows Voice Access, or a snippet app that also does voice typing.
A lot of what developers type is not code. It is the PR description skeleton, the "can you add a test for this?" review comment, the bug report template, the Co-authored-by: trailer, the standup update. Dictating all of that word by word is slow, and typing it is repetitive. Voice commands to insert text snippets sit in between: you say a short phrase, and a saved block of text lands at your cursor.
This guide covers what that actually means, how to design spoken phrases that don't misfire, and four ways to set it up, from a fully scriptable tool to a snippet app that already has voice built in.
What "voice commands to insert text snippets" means
Three terms get mixed up, so here are plain definitions:
- Dictation (voice typing): speech is converted to text, more or less word for word. What you say is what gets typed.
- Snippet (text expansion): a saved piece of text tied to a short trigger, such as
/prdesc. Typing the trigger replaces it with the full text. - Voice command for a snippet: a spoken phrase that inserts a saved snippet instead of transcribing your words. You say "insert PR description", and the template appears. Nothing you said is typed literally.
The key difference is that a snippet is exact. A dictated PR template will vary every time. A voice-inserted one is identical every time, with the same headings, checkboxes and Markdown.
Why developers end up wanting this
Some common reasons:
- Templates with structure. PR descriptions, issue reports and incident notes have fixed headings. Snippets keep them consistent across a team.
- Review comments. "Nit: ...", "Blocking: ...", "Could you add a test that covers ...?" are the same handful of openers every day.
- Git trailers and boilerplate.
Signed-off-by:,Co-authored-by:, ticket references, license headers. - RSI and fatigue. If your hands need a break, inserting whole blocks by voice saves far more keystrokes than dictating them.
Step 1: Design phrases you can say (and the computer can't confuse)
Whatever tool you pick, the phrase design matters more than the tool. A few rules that hold up:
- Start every command with a fixed verb. "Insert", "snippet" or "paste" followed by the name. The verb tells the system "this is a command, not dictation."
- Use names with two or more syllables. "PR body" or "review nit" are harder to mishear than "pr" or "nit".
- Avoid names you would also dictate as normal words. If you often say "review", don't make a snippet named just "review".
- Make the spoken name match the snippet's title. If the title is "Review nit" and the trigger is
/rnit, you can remember either one. - Keep a short list. Ten to twenty voice-friendly snippets cover most of a dev day. Everything else can stay as typed triggers.
Here is a small starter set:
| Spoken name | Typed trigger | What it inserts |
|---|---|---|
| "PR description" | /prdesc |
Summary, changes, how to test, checklist |
| "review nit" | /rnit |
"Nit (non-blocking): ..." |
| "review blocking" | /rblock |
"Blocking: ... Happy to pair on this." |
| "add test" | /rtest |
"Could you add a test that covers ...?" |
| "bug report" | /bug |
Steps to reproduce, expected, actual, environment |
| "co-author" | /coauth |
Co-authored-by: Name <email> |
And a PR template body you could save as the /prdesc snippet:
## Summary
## Changes
-
## How to test
1.
## Checklist
- [ ] Tests added or updated
- [ ] Docs updated
- [ ] No secrets or debug logs
Step 2: Pick a way to trigger snippets by voice
Option A: Talon (scriptable, developer-focused)
Talon is a hands-free control tool popular with programmers. Commands live in .talon files, and inserting text is a one-liner per command. A minimal example:
app: vscode
-
insert pr description: insert("## Summary\n\n## Changes\n- \n\n## How to test\n1. \n")
review nit: insert("Nit (non-blocking): ")
co author: insert("Co-authored-by: ")
The header scopes commands to an app, so "review nit" only works where you write reviews. Talon is very flexible, but you maintain your snippets as code, and they live separately from any typed text expander you use.
Option B: macOS Voice Control custom commands
On a Mac, Voice Control (System Settings, Accessibility, Voice Control) has a Commands list where you can add your own. You set the phrase under "When I say", optionally limit it to one app, and choose an action such as inserting text. It is built in and needs no install. The trade-off is that commands are per Mac, and editing long Markdown templates in that dialog is awkward.
Option C: Windows Voice Access voice shortcuts
Recent Windows 11 builds add custom voice shortcuts to Voice Access, which can insert text among other actions. Availability depends on your Windows build and display language, so check Voice Access settings on your machine before planning around it. Like the Mac option, it is tied to one computer.
Option D: A snippet app with voice commands built in
The fourth approach flips things around: keep your snippets in a text expander, and let the same app recognize a spoken command that inserts them. Then one snippet works three ways: typed trigger, picker, or voice. You maintain one library instead of a text expander plus a separate voice config.
How this works in InsertKit
InsertKit combines AI voice typing, a text expander and a clipboard manager, on Windows, macOS, Linux, Android and as a Chrome extension. Its Voice Snippets feature is Option D.
The flow on desktop:
- Create a snippet with a title and trigger, for example title "Review nit" and trigger
/rnit. Triggers use a prefix such as/. - Put your cursor in a PR comment box, Slack, or your editor.
- Press your voice typing shortcut and say the call name plus the snippet name: "insert review nit".
- InsertKit fuzzy-matches what you said against snippet triggers and titles, so you don't have to say it perfectly, and pastes the snippet at your cursor.
A few details that matter for developers:
- Snippets are pasted as saved. When the phrase matches a snippet, it is inserted directly. AI formatting only runs on normal dictation, so your Markdown, checkboxes and trailers stay exactly as written.
- No match means normal dictation. If the phrase doesn't start with the call name or doesn't match a snippet, the speech goes through as regular voice typing.
- The call name is configurable. The default is "insert". You can change it (letters only, no spaces) if "insert" collides with how you talk.
- Title-only snippets work by voice. A snippet with no trigger won't expand from typing, but you can still insert it by voice, search, or the clipboard popup. That's handy for long templates you never want to fire by accident.
- Variations. A snippet can hold several versions under one trigger, such as a short and a detailed review reply. When it fires, a picker lets you choose.
- Custom Vocabulary. Add jargon like "Kubernetes" as hint words, or corrections ("heard as" → "write as"), so the speech engine gets your project names right.
Beyond fixed snippets, the Voice Assistant handles one-off text: say "hey ik" followed by a request, and the AI writes the answer into the field. You can choose which chat model answers, and in Settings → API Keys you can add a custom OpenAI-compatible provider such as Ollama or LM Studio if you want to point the AI at a local model.
Snippets, clipboard history and vocabulary sync to your account, so the same voice-ready library works on desktop and Android, and voice snippets also work in the Chrome extension. Speech recognition covers 100+ languages, and on desktop you can run speech locally with offline Whisper models.
Comparison: four ways to insert snippets by voice
| Talon | macOS Voice Control | Windows Voice Access | InsertKit Voice Snippets | |
|---|---|---|---|---|
| Setup style | Code (.talon files) |
Settings dialog | Settings dialog | Snippet editor |
| Same snippet also works by typed trigger | No, separate tool | No | No | Yes |
| Platforms | Desktop | Mac only | Windows 11 only | Windows, macOS, Linux, Android, Chrome |
| Sync across devices | Via your own files | No | No | Yes, through your account |
| App-specific commands | Yes | Yes | Check your build | No, matches by phrase in any app |
| Fuzzy matching of names | Depends on your config | No | No | Yes |
| Also does AI dictation | Not the focus | Basic dictation | Basic dictation | Yes, with app-aware formatting |
Talon wins on scriptability and full hands-free control. The built-in OS options win on zero install. A snippet app wins when you want one library that works whether you type or speak.
Common mistakes
- Too many voice commands. Start with the five templates you use daily.
- Names that sound alike. "Review nit" and "review fix" will collide. Rename one.
- Long templates with placeholders you forget to fill. Put a visible marker like
TODOin the snippet so it's obvious what still needs editing. - Snippets firing while you code. In InsertKit, F4 toggles the snippet system off and on, which helps if typed triggers collide with code.
FAQ
Do voice commands to insert text snippets need an internet connection?
It depends on the tool. Talon and the OS options run locally. In InsertKit, speech can run offline on desktop with local Whisper models; cloud engines need a connection.
Will AI change my snippet text?
Not in InsertKit. When a voice phrase matches a snippet, the snippet is pasted as saved. AI formatting applies to ordinary dictation only.
Can I use this in VS Code or a terminal?
Voice snippets paste at the cursor, so they work in editors and most apps where you can type. For plain dictation, InsertKit's Code profile formats speech as comments, and spoken identifiers become camelCase or snake_case.
Is there a free option?
Talon's public version is free to download, and the OS tools are built in. InsertKit has a free plan with a daily voice limit, and Premium uses credits.
Can my team share voice-ready snippets?
In InsertKit, snippets can be Private or Teams. Teams snippets are shared with members (teams are managed on the web dashboard), so everyone works from the same templates and names.
Wrapping up
Start small: pick five snippets you type every day, give them speakable names, and try inserting them by voice for a week. If you want one library that works by typed trigger and by voice on every machine, the InsertKit download page has builds for desktop and Android. If you prefer scripting everything, Talon is worth a look.
Comments
Join the discussionNo comments yet. Be the first to comment.