Skip to main content
KugelAudio provides text processing features to ensure your text is spoken naturally. This includes automatic normalization of numbers, dates, and currencies, as well as the ability to spell out text letter by letter.

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”
Enable normalization by setting normalize=True (Python), normalize: true (JavaScript), or "normalize": true (JSON):
Using normalize without specifying language may cause incorrect normalizations, especially for short texts or languages that share similar vocabulary. Always specify language when you know it.

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.

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:
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.
Model recommendation: For clearer letter-by-letter pronunciation, use kugel-3 instead of kugel-3.

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:
For more details, see Voice Agent Prompting and Streaming overview.

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:

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