Text Normalization
Text normalization converts numbers, dates, times, and other non-verbal text into spoken words:- “I have 3 apples” → “I have three apples”
- “The meeting is at 2:30 PM” → “The meeting is at two thirty PM”
- “€50.99” → “fifty euros and ninety-nine cents”
normalize=True (Python), normalize: true (JavaScript), or "normalize": true (JSON):
- Python
- JavaScript
- Java
- cURL
Supported Languages
Spell Tags
Use<spell> tags to spell out text letter by letter. This is useful for email addresses, codes, acronyms, or any text that should be pronounced character by character.
Spell tags require
normalize to be enabled.- Python
- JavaScript
- Java
- cURL
Language-Specific Character Translations
Special characters within<spell> tags are translated based on the language:
Spell Tags with Streaming
Spell tags work seamlessly with streaming. When streaming text token-by-token (e.g., from an LLM), tags that span multiple chunks are automatically handled:- Python
- JavaScript
- Java
- cURL
Streaming Safety: The system buffers text until the closing
</spell> tag arrives before generating audio. If the stream ends unexpectedly, incomplete tags are auto-closed so the content still gets spelled out.Using Spell Tags with LLMs
When integrating with language models, add instructions to your system prompt so the LLM wraps appropriate text in spell tags:Custom Pronunciation Dictionaries
When normalization and<spell> tags aren’t enough — brand names,
product names, acronyms the model gets wrong — attach a per-project
dictionary. The TTS pipeline substitutes word → replacement before
synthesis and invalidates its cache the moment you change the
dictionary, so the next request picks it up.
Manage dictionaries from the dashboard or the API:
- Guide: Dictionaries — how pronunciation dictionaries work
- API:
/v1/dictionaries— full CRUD plus atomic bulk replace - SDKs:
client.dictionaries.*(Python, JavaScript, Java)
Next Steps
Generate Speech
Basic speech generation
Streaming
Real-time audio streaming
Voice Agent Prompting
System prompt patterns for LLM-driven voice agents
Custom Dictionaries
Per-project pronunciation fixes for brand names and acronyms