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 ReplacementsYour 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:

Replacement Text

The text that will replace any matched alias. Can be:

Standard Options

These options are available for normal (non-regex) replacement rules:

Enabled Toggle the rule on or off without deleting it
Flexible Match Match aliases regardless of spaces, dashes, colons, semicolons, or periods between characters. "hashtag" will match "hash tag", "hash-tag", "hash.tag", etc.
Absorb Punctuation Include any trailing punctuation (periods, commas, exclamation marks, question marks, semicolons, colons) in the match. Useful when replacing a word that might appear at the end of a sentence.
Preserve Case Maintain the capitalization of the matched text in the replacement. If you match "Hello", the replacement will be capitalized. If you match "HELLO", the replacement will be uppercase.

Scope Options

Control where in the text the replacement can occur:

Anywhere Match the pattern anywhere in the transcription (default)
Whole Word Only match when the pattern is a complete word, not part of another word. "cat" won't match "category"
Start Only Only match at the beginning of the transcription
End Only Only match at the end of the transcription

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:

Tips for Better Replacements

Use Whole Word scope Prevents unintended matches within longer words. "cat" won't match "category"
Test with common variations Add multiple aliases for words that might be transcribed differently
Enable Flexible Match for compound words Catches "email", "e-mail", and "e mail" with a single rule
Use Preserve Case for proper nouns Keeps "HELLO" uppercase and "Hello" capitalized appropriately
Start simple, add regex only when needed Standard options cover most use cases. Use regex for complex patterns
Disable rules instead of deleting You might need them again later

Troubleshooting

Replacement not working?

Too many matches?

Regex not matching?

Built-in Replacements

WhisperTyping comes with many replacements already built in, so you don't need to create them yourself:

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.