Text Replacements
Text replacements let you automatically transform your transcribed text before it's typed out. Create rules to expand abbreviations, insert symbols, fix common misrecognitions, or perform complex text transformations using regular expressions.
How It Works
After WhisperTyping transcribes your speech, but before the text is typed into your application, all enabled replacement rules are applied in order. This happens before any AI processing, giving you precise control over the raw transcription output.
Processing Order: Speech → Transcription → Built-in Replacements → Your Text Replacements → AI Processing (if enabled) → Output
Creating a Replacement Rule
Open Settings → Replacements and click "Add" to create a new rule. Each rule has the following options:
Aliases (Match Patterns)
Enter one or more text patterns to match. Each alias is checked independently, and any match triggers the replacement. This is useful when:
- A word might be transcribed differently (e.g., "email" and "e-mail")
- You want multiple phrases to produce the same output
- You're creating shortcuts (e.g., "btw" → "by the way")
Replacement Text
The text that will replace any matched alias. Can be:
- Plain text
- Empty (to delete the matched text)
- Multi-line text (for templates or signatures) Pro
- Special characters and symbols
Standard Options
These options are available for normal (non-regex) replacement rules:
Scope Options
Control where in the text the replacement can occur:
Common Use Cases
Abbreviation Expansion
Expand shortcuts into full phrases:
| Alias | Replacement |
|---|---|
| btw | by the way |
| afaik | as far as I know |
| sig | Best regards, John Smith |
Fixing Misrecognitions
Correct words that are frequently mistranscribed:
| Alias | Replacement | Tip |
|---|---|---|
| whether typing | WhisperTyping | Product names are often misheard |
| John Doe, john doe | John Doe | Use multiple aliases for name variations |
Regular Expressions
For advanced users, enable "Regular Expression" mode to use regex patterns. This gives you powerful pattern matching capabilities.
Important: When regex mode is enabled, Scope, Flexible Match, Absorb Punctuation, and Preserve Case options are hidden and ignored. You have full control through your regex pattern.
Regex Basics
All regex patterns in WhisperTyping are case insensitive by default. You don't need to add any flags for case-insensitive matching.
| Pattern | Matches |
|---|---|
hello |
"hello", "Hello", "HELLO", "HeLLo" |
colou?r |
"color" and "colour" |
\d+ |
One or more digits |
^hello |
"hello" at the start only |
goodbye$ |
"goodbye" at the end only |
\bword\b |
"word" as a whole word |
Making Regex Case Sensitive
If you need case-sensitive matching, use the inline modifier (?-i) at the start of your pattern:
| Pattern | Matches |
|---|---|
(?-i)Hello |
Only "Hello" (exact case) |
(?-i)API |
Only "API" (uppercase) |
Capture Groups in Replacements
Use parentheses to capture parts of the match, then reference them in the replacement with $1, $2, etc.:
| Pattern | Replacement | Example |
|---|---|---|
(\d+) dollars |
$$$1 |
"50 dollars" → "$50" |
(\w+)@(\w+) |
$1 at $2 |
"john@company" → "john at company" |
Advanced Regex Examples
\s{2,} →
Replace multiple spaces with a single space
^\s+|\s+$ → (empty)
Trim leading and trailing whitespace
(\w)'(\w) → $1'$2
Fix curly apostrophes to straight apostrophes
(?<=\d),(?=\d{3}) → (empty)
Remove thousands separators from numbers (uses lookbehind/lookahead)
Tip: Insert Your Email Address
Voice transcription can produce different variations of the same phrase. Use .{0,3} (match any 0-3 characters) to catch them all in one rule:
Pattern: work.{0,3}mail → [email protected]
This single pattern matches all of these variations when you say "work email":
- "work mail" (space = 1 char)
- "work email" (space + e = 2 chars)
- "work, mail" (comma + space = 2 chars)
- "work, email" (comma + space + e = 3 chars)
Much cleaner than creating multiple separate rules!
Processing Order
Replacement rules are applied in the order they appear in the list. You can drag and drop rules to reorder them. This matters when:
- One rule might affect text that another rule matches
- You want to apply a broad rule first, then specific exceptions
- You're chaining transformations
Tips for Better Replacements
Troubleshooting
Replacement not working?
- Check that the rule is enabled
- Verify the scope setting matches where the text appears
- Try adding the exact transcribed text as an alias (check your history)
- If using regex, check for syntax errors in your pattern
Too many matches?
- Change scope to Whole Word to avoid partial matches
- Add more specific aliases instead of broad patterns
- Reorder rules so specific ones come before general ones
Regex not matching?
- Remember that patterns are case insensitive by default
- Special characters like
.*?+need escaping:\.\*etc. - Test your regex pattern at regex101.com (select .NET flavor)
Built-in Replacements
WhisperTyping comes with many replacements already built in, so you don't need to create them yourself:
- Spoken Punctuation – Say "period", "comma", "question mark", "exclamation point", and more to insert punctuation marks
- Symbols – Say "at sign", "dollar sign", "hashtag", "ampersand", and other common symbols
- Emojis – Say "smiley face", "thumbs up", "heart", and many other emoji names
See the Spoken Punctuation page for a complete list of built-in replacements.
Need help with text replacements?
Having trouble setting up a replacement rule? Send us a message and we'll help you out.