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

# Text Normalization

> Convert numbers, dates, and symbols into spoken words, with language hints and spell tags

Text normalization converts numbers, dates, times, and other non-verbal text
into spoken words (for example "3 apples" becomes "three apples"). How it
works, the supported languages and their codes are documented in
[Text processing](/features/text-processing). The JavaScript SDK controls it
with the `normalize` and `language` options:

```typescript theme={null}
// With explicit language (recommended)
const audio = await client.tts.generate({
  text: 'I bought 3 items for €50.99 on 01/15/2024.',
  voiceId: 1071,
  normalize: true,
  language: 'en',
});

// Without language: normalized in the voice's primary language (English if none)
const voiceLanguageAudio = await client.tts.generate({
  text: 'Ich habe 3 Artikel für 50,99€ gekauft.',
  voiceId: 1071,
  normalize: true,
  // language not specified: the voice's primary language is used
});
```

<Warning>
  Using `normalize: true` without specifying `language` may cause incorrect normalizations, especially for short texts or languages that share similar vocabulary. Always specify `language` when you know it.
</Warning>

## Spell Tags

Wrap text in `<spell>` tags to have it read character by character (emails,
codes, acronyms). Tag semantics and per-language character names are in
[Spell tags](/prompting/spell). In a streaming session, a tag split across
tokens is handled for you:

```typescript theme={null}
const session = client.tts.streamingSession(
  { voiceId: 1071, normalize: true, language: 'en' },
  { onChunk: (chunk) => playAudio(chunk.audio) },
);
await session.connect();

session.send('My code is <spell>');
session.send('ABC123</spell>');

await session.close();
```

`playAudio` stands for your own playback function.

## Next steps

* [Dictionaries](/sdks/javascript/dictionaries): per-project pronunciation and replacement lists
* [Generate Speech](/sdks/javascript/generate): generation parameters including `normalize` and `language`
