Numbers, dates, symbols and acronyms can present a challenge to the AI, as there are often multiple ways that they could be delivered correctly. This can also depend on the language that is being used, for example, “11” could be read as "Eleven," but it could also be "Once" in Spanish or "Elf" in German.
There are several ways you can ensure the correct delivery of numbers, dates, acronyms and symbols.
Write out fully, in words
For the best results, we recommend writing numbers, acronyms, dates and symbols fully, in words, in the way that you would like the AI to deliver them. This ensures that the AI has the most context so that it will provide the correct output. For example, for “$100”, we would recommend writing either "a hundred dollars" or "one hundred dollars" to ensure you get the result you would like.
Using an LLM
If you are using an LLM to generate your text prompts, you can prompt the LLM to always write numbers, dates, symbols and acronyms out in words in whichever way you would prefer them to be delivered by the AI.
Normalization
If you’re generating via the API, you can specify whether to apply text normalization using the apply_text_normalization parameter. Text normalization spells out numbers and dates to ensure better pronunciation This option does add latency as the normalization process takes additional processing time.
The apply_text_normalization parameter has three modes:
- on, which means it is always applied
- off, which means it is never applied
- auto, which means that the AI will automatically decide when to apply text normalization
Due to the added latency, apply_text_normalization can only be set to “off” or “auto” for Flash v2.5 and Turbo v2.5.
For more information, please see our API reference.
Normalization is enabled by default when generating using Text to Speech via the website.
In Studio, the default is for normalization to be automatically applied, meaning that the AI will decide when to apply text normalization. You can also set normalization to be always applied - this option is in Project settings under the Advanced tab.