Skip to main content

Text Replacement Rules Engine

Clean your text automatically before every synthesis.

What Is the Replacement Rules Engine?

The replacement rules engine automatically cleans and transforms text before it is sent to a TTS engine. Rules run on every text block before synthesis, fixing common pronunciation issues, removing unwanted characters, normalizing formatting, and converting abbreviations to their spoken equivalents.

Rules are organized by language, so different corrections apply depending on whether you are generating English, Russian, German, or French speech.

Why Use Replacement Rules?

Fix recurring pronunciation errors. Every TTS engine mispronounces certain words, acronyms, or technical terms. Instead of manually fixing the text every time, create a rule once and it applies automatically to all future synthesis.

Clean up imported text. Text copied from websites, documents, or subtitle files often contains artifacts — extra spaces, special characters, formatting marks, or HTML entities. Rules strip these automatically.

Normalize abbreviations. Convert “Dr.” to “Doctor”, “St.” to “Street” or “Saint”, “vs.” to “versus”, and other abbreviations to their spoken forms. Prevents TTS from reading them literally.

Language-specific corrections. Each language has its own set of pronunciation quirks. German compound words, French liaison rules, Russian stress patterns — rules tailored per language handle these automatically.

How It Works

Step 1: Create a rule. Define a text pattern to find and the replacement text. Rules can be simple string replacements or more complex pattern matches.

Step 2: Assign a language. Each rule is tagged with a language code. Rules only activate when generating speech in that language.

Step 3: Rules apply automatically. Before any TTS generation, SoundWorks runs the active rules for the selected language against your text. The cleaned text is then sent to the TTS engine.

Multi-Language Support

SoundWorks ships with built-in rule sets for English, Russian, German, and French. You can modify these or add rules for additional languages. Each language’s rules are independent and only activate when that language is selected for synthesis.

Frequently Asked Questions

Can I disable rules temporarily? Yes. Rules can be toggled on and off individually. Disable specific rules for certain projects without deleting them.

Do rules affect the original text? No. Rules are applied to a copy of the text before synthesis. Your original text remains unchanged.

Can I export and share rule sets? Rule sets are stored as files in the SoundWorks data directory. You can copy them to share with other users or back them up.

How many rules can I create? There is no practical limit. Rules are lightweight text transformations that process instantly regardless of how many you define.

Ready to get started?

Download SoundWorks Free