<spell> tags causes each character to be read out
individually. Useful for email addresses, verification codes, acronyms, and
serial numbers.
· above is a 500 ms pause: spelled content is automatically
grouped so a listener can follow it.
Content inside
<spell> automatically bypasses text normalization.
normalize: true still normalizes the surrounding prose. Always set
language so special characters (@, ., -, _) use the correct
language-specific spoken words.Character translations by language
Letters are spelled with their phonetic names, digits with their spoken
names. Whitespace inside a spell block is read as the word “space” (or the
language’s equivalent).
Grouping
Spelled content is grouped automatically: a 500 ms pause every four letters or digits, the way a human reads a code aloud.., a -, or an @ —
so each run of characters is grouped on its own. @ additionally gets a
pause on both sides, keeping the two halves of an email address apart.
Multi-word content is grouped word by word, and the space between words is
still read as the word “space”:
group="N":
group="0" to switch grouping off and have the content read as one
unbroken run.
Examples
- Python
- JavaScript
- cURL
Pitfalls
- No nesting. A
<spell>tag inside another spell block is read as literal characters. - No break tags inside spell blocks — use grouping for pacing instead.
Spell tags in streaming
When streaming text token-by-token, spell tags that span multiple chunks are handled automatically: the server buffers text until the closing</spell>
arrives before generating audio, and auto-closes incomplete tags if the
stream ends unexpectedly. See Streaming overview.