https://retellai.com/?utm_source=discord&utm_medium=seo logo
my retell agent is reading text out loud as domain...
# ❓・ai-evy-support
p
@AI Evy my retell agent is reading text out loud as domain names because of periods. How do I prevent this?
a
Thanks for tagging me @punk8357. I'll look through relevant sources and get back to you shortly.
### Answer Enable the
normalize_for_speech
setting on your agent. [(1) ]() [(2) ]() When set to
true
, this normalizes text (numbers, currency, dates, etc.) to its spoken form before audio generation, which helps the TTS system handle punctuation and special characters more naturally. For example, it converts text like "Call my number 2137112342 on Jul 5th, 2024 for the $24.12 payment" to "Call my number two one three seven one one two three four two on july fifth, twenty twenty four for the twenty four dollars twelve cents payment" before generating audio. You can enable this in your agent's Speech Settings in the dashboard under "Speech Normalization." [(3) ]() Additionally, you can add prompt instructions telling the LLM to avoid using periods in ways that could be misinterpreted (e.g., "Do not use abbreviations with periods like 'e.g.' or 'i.e.' - spell them out instead") . [(4) ]()
​ To learn more, see the sources I considered: [[1] Get Voice Agent](https://docs.retellai.com/api-references/get-agent) [[2] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) [[3] Step 2: Configure the basic settings](https://docs.retellai.com/build/single-multi-prompt/configure-basic-settings) [[4] My agent is pronouncing em-dashes in responses saying, "A-T" or "O-T" or "OT"](https://community.retellai.com/t/my-agent-is-pronouncing-em-dashes-in-responses-saying-a-t-or-o-t-or-ot/743) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy it’s still saying max dot no for “… max. No …”
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer If speech normalization is already enabled and you're still getting "max dot no" for "max. No", try these additional approaches: 1. Use Prompt Engineering Add explicit instructions in your Global Prompt to prevent the LLM from generating sentence structures that cause this issue: [(1) ]()
Copy code
Never use periods followed immediately by a word that could be misread. Use commas or start new sentences with proper spacing instead.
[(2) ]() 2. Configure Pronunciation Dictionary You can set up pronunciation guides for specific problematic patterns in your agent's Speech Settings. [(1) ]() The pronunciation dictionary accepts entries like: [(3) ]()
Copy code
json
{
  "word": "max.",
  "alphabet": "ipa",
  "phoneme": "mæks"
}
3. Try a Different Voice Model Some voice models handle punctuation better than others. You can select different voice models in your agent's voice settings. [(1) ]() [(3) ]() Important Note on Speech Normalization Speech normalization currently supports English, Spanish, French, and German. Other languages will result in a no-op (text not modified) . [(4) ]() Make sure your agent's language setting matches one of these supported languages for normalization to work properly. The most effective solution is likely combining prompt instructions to avoid problematic punctuation patterns with the pronunciation dictionary for specific edge cases. [(2) ]()
​ To learn more, see the sources I considered: [[1] Step 2: Configure the basic settings](https://docs.retellai.com/build/single-multi-prompt/configure-basic-settings) [[2] My agent is pronouncing em-dashes in responses saying, "A-T" or "O-T" or "OT"](https://community.retellai.com/t/my-agent-is-pronouncing-em-dashes-in-responses-saying-a-t-or-o-t-or-ot/743) [[3] Get Agent Versions](https://docs.retellai.com/api-references/get-agent-versions) [[4] Normalize text for speech](https://docs.retellai.com/build/normalize-text) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
p
@AI Evy any way to enforce spaces after periods or no because we don’t control the models text output?
a
Thanks for the follow-up, @punk8357. I'll get back to you soon.
### Answer You can influence the LLM's text output through prompt engineering in your Global Prompt. [(1) ]() While you don't have direct control over the model's raw text generation, you can add explicit instructions to guide formatting behavior. For example, include something like:
Copy code
Always ensure proper spacing after periods. Never output text like "word.Word" - always use "word. Word" with a space after periods.
[(2) ]() This approach—using enforcing language in prompts—is the recommended method for controlling LLM output formatting. [(3) ]() Using words like "strictly," "always," and "never" helps reinforce the behavior. Additionally, prompt engineering allows the AI to adapt dynamically without requiring full retraining. [(4) ]() If prompt instructions alone don't fully resolve the issue, combining them with the pronunciation dictionary for specific edge cases tends to be the most effective solution. [(2) ]()
​ To learn more, see the sources I considered: [[1] Step 2: Configure the basic settings](https://docs.retellai.com/build/single-multi-prompt/configure-basic-settings) [[2] My agent is pronouncing em-dashes in responses saying, "A-T" or "O-T" or "OT"](https://community.retellai.com/t/my-agent-is-pronouncing-em-dashes-in-responses-saying-a-t-or-o-t-or-ot/743) [[3] Discord message from @talha1216 on 2024-06-17](https://discord.com/channels/1186424376300679209/1186462578310910112/1252304163979919463) [[4] Training & Customizing AI Voice Agents | Retell AI](https://www.retellai.com/blog/training-and-customizing-voice-agents-with-retell-ai) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.