> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Text normalization

> Rime normalizes numbers, dates, currency, phone numbers, and measurements before synthesis, in English and other supported languages.

When you send text to Rime's TTS models, a normalization layer runs first. It expands numbers, dates, currency, phone numbers, measurements, and other non-standard words into their spoken form before the model synthesizes audio.

> [!NOTE]
>
> **Rime handles text normalization automatically.** Most common formats (currency with symbols, dates with years, clock times, phone numbers, and standard measurements) expand correctly without any preprocessing. Just write naturally. If something sounds wrong, [debug it with `/textnorm`](#debugging-with-the-textnorm-endpoint) before adding a pre-processing layer to your application.

## Handled at a glance

Select a category for its full input/output reference.

| Category | Examples | Reference |
| :- | :- | :- |
| Numbers, currency, ranges, measurements | `$1,045.96`, `5kg`, `98°F`, `13-50`, `1/2`, `1e6`, `(213) 555-9274` | [Numbers, currency, and measurements](https://docs.rime.ai/docs/numbers.md) |
| Dates and times | `10/12/2024`, `2021-03-15`, `April 2, 2024`, `3:45pm`, `15:45`, `noon` | [Dates and times](https://docs.rime.ai/docs/dates.md) |
| Addresses, URLs, emails | `529 Main St., Boston, MA 02129`, `https://app.rime.ai`, `name@example.com` | [Addresses, URLs, and emails](https://docs.rime.ai/docs/addresses.md) |
| Abbreviations, acronyms, initialisms | `Dr. Smith`, `e.g.`, `NASA`, `d. n. a.` | [Abbreviations, acronyms, and initialisms](https://docs.rime.ai/docs/abbreviations.md) |
| Symbols and percentages | `&`, `$`, `%`, `100%` | [Symbols and percentages](https://docs.rime.ai/docs/symbols.md) |

## Forced letter-by-letter reading

For account numbers, confirmation codes, SKUs, and acronyms the normalizer doesn't recognize, wrap the string in `spell(...)` to force letter-by-letter pronunciation. It works on Coda and Mist v3, with different grouping. Mist v3 reads this code in groups of three where possible:

```text theme={null}
Input:   Your confirmation code is spell(PRM423GDDML2354).
Mist v3: Your confirmation code is P R M, 4 2 3, G D D, M L, 2, 3 5 4.
```

For Coda's grouping and more examples, see [Spell function](https://docs.rime.ai/docs/spell.md).

## Brand names, product names, and uncommon words

Rime's models may not nail uncommon brand or product names on the first try. Three options:

1. **Submit the word to Rime** to add to the dictionary (typically about a week). Reach out to your account manager via Slack or email, or contact [sales@rime.ai](mailto:sales@rime.ai). Mention it if you need faster turnaround or have an SLA.
2. **Send a custom lexicon with a Coda request** in English, German, Spanish, French, Italian, or Portuguese. See [Phoneme control](https://docs.rime.ai/platform/phoneme-control).
3. **Use custom pronunciations inline** on English Mist v3, with the [Rime phonetic alphabet](https://docs.rime.ai/platform/rime-phonetic-alphabet.md) and `phonemizeBetweenBrackets: true`. See [Custom pronunciation](https://docs.rime.ai/docs/custom-pronunciation) for the full reference.

A lexicon and inline pronunciations do not cover Coda in Arabic, Dutch, Hindi, or Japanese, or non-English Mist v3. In those cases, submit the word to Rime, or respell it phonetically in plain English. Respelling is approximate. For the full inline reference, see [Custom pronunciation](https://docs.rime.ai/docs/custom-pronunciation). To check whether a word is already in Rime's dictionary, use the [Coverage API](https://docs.rime.ai/api-reference/other/oov.md).

## Feature availability across models

| Feature | Coda | Mist |
| :- | :-: | :-: |
| Native text normalization (numbers, currency, dates, etc.) | ✅ | ✅ |
| `spell()` for forced letter-by-letter | ✅ (English: letters straight through, longer digit runs in pairs; other languages: threes) | ✅ (v3: threes where possible) |
| Punctuation-driven prosody | ✅ | ✅ |
| [`pauseBetweenBrackets`](https://docs.rime.ai/docs/custom-pauses) (custom pause tags like `<750>`) | ❌ | ✅ |
| [`phonemizeBetweenBrackets`](https://docs.rime.ai/docs/custom-pronunciation) (inline phonetic strings) | ❌ | ✅ (English v3) |
| [Custom lexicon](https://docs.rime.ai/platform/phoneme-control) (X-SAMPA pronunciation per word or phrase) | ✅ (6 languages) | ❌ |

For flows that need precise pause durations (legal disclaimers, regulated read-backs), Mist is the safer choice.

## Debugging with the textnorm endpoint

The fastest way to spot-check normalization without writing code is the [Generate page in the Rime web app](https://app.rime.ai/generate/): paste any input string and it shows you the normalized version Rime will synthesize from.

For programmatic debugging, Rime also exposes a `/textnorm` endpoint that returns the grammar normalizer's output for an input string. That output matches Coda's normalization; Mist v3 can group `spell()` sequences differently. In scripts and pipelines, use it to separate normalization issues from synthesis issues.

```bash theme={null}
curl -X POST https://optimize.rime.ai/textnorm \
    -H "Authorization: Bearer $(rime key)" \
    -H "Content-Type: application/json" \
    -d '{"text":"1234 1,2,3,4 1-800-444-4141 "}'
```

```json theme={null}
{"normalized":"twelve thirty four, one , two , three , four, one, eight hundred, four four four, four one four one"}
```

The endpoint defaults to English. For other languages, pass a language code in the `lang` field:

```bash theme={null}
curl -X POST https://optimize.rime.ai/textnorm \
    -H "Authorization: Bearer $(rime key)" \
    -H "Content-Type: application/json" \
    -d '{"text":"Tengo 2 perros","lang":"es"}'
```

See [Languages](https://docs.rime.ai/docs/voices.md#languages) for the full list of supported languages. Output is the same regardless of which model you'll synthesize with. For the full request and response reference, see the [Text Normalization API](https://docs.rime.ai/api-reference/other/textnorm.md).

### Triage workflow

When something sounds off:

1. **Capture the exact input text** that produced the bad output.
2. **POST it to `/textnorm`** and look at the normalized output.
3. **Compare** the normalized output to what you expected the model to say.
4. If normalization is wrong, you have a reproducible signal; [flag it to Rime](mailto:support@rime.ai) with the input, expected normalization, and actual normalization. Fixes ship on Rime's side.
5. If normalization looks correct but speech still sounds off, the issue is in synthesis, not normalization; try a different voice, model version, or sampling settings.

## Testing checklist

Before going to production, test the voice against realistic versions of:

1. Every date format your backend can produce (MM/DD, MM/DD/YYYY, ISO, relative like "tomorrow").
2. Every currency you'll quote, including round numbers and fractional cents.
3. The longest realistic phone number, account number, and confirmation code.
4. Your top 20 most-spoken product or brand names.
5. At least one utterance from each of: quote, greeting, confirmation, error, payment, scheduling.
6. The same utterance regenerated 5 to 10 times. Consistency across regenerations is what catches sampling variance.

For anything that sounds wrong, POST the exact input to [`/textnorm`](#debugging-with-the-textnorm-endpoint) to see what the model actually received, then [flag it to Rime](mailto:support@rime.ai) so the fix lands for everyone.

## Pre-normalizing in your application

For most applications, pre-normalizing is unnecessary and adds latency and engineering complexity. Rime's normalizer handles common patterns natively, and the fastest way to fix a pronunciation issue is to verify with [`/textnorm`](#debugging-with-the-textnorm-endpoint) and [flag any miss to Rime](mailto:support@rime.ai).

If a pattern genuinely needs to be pre-expanded, such as a domain-specific alphanumeric ID or a flow that must read identically after regeneration, see [Pre-normalizing text](https://docs.rime.ai/docs/pre-normalization.md) for guidance and a drop-in prompt template.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.