Topic 2 of 5 · 4 min read
Reading numbers, dates and names aloud
Goal: Fix a reply so the speech engine reads its dates, amounts, codes and names in a way a caller can follow and write down.
A speech engine reads what it is given, so turn dates, amounts, codes and names into the exact words a person would say, and give the caller a way to check them.
Check yourself · 1 of 3
A reply contains 'Your visit is on 3/4.' Why is this risky in a voice agent?
Why it matters
Text that looks fine on a screen can sound wrong. "10/11" may be read as "ten slash eleven", "October eleventh" or "the tenth of November". "£1,250.50" may become "one thousand two hundred and fifty pounds fifty". "INV-2041" may come out as a word. Names are worse: "Siobhan" or "Nguyen" may be read with the wrong sounds. A caller who hears a wrong date or a mangled name loses trust fast, and may act on bad information.
How to do it
- Normalise before speech. Text normalisation is the step that converts written forms ("3/4", "$20", "Dr.") into spoken words. Many speech engines do it, but their guesses vary. For anything important, write the spoken form in the reply yourself, or tell the model to: "Write dates as 'Tuesday, the fourth of March'. Write money in words."
- Group numbers the way people say them. Phone numbers in groups of three or four with a pause: "0 7 7 0 0, 9 0 0, 1 2 3". Account codes one character at a time. Long numbers in chunks, never as one big number.
- Say the unit and the day. "Three p.m. on Friday the fifth" is safer than "15:00 5/12".
- Use a pronunciation dictionary or SSML for known problem words. A pronunciation dictionary maps a word to how it should sound, and applies to every reply. SSML (Speech Synthesis Markup Language, a W3C standard) wraps text in tags that control how it is spoken, such as
say-asfor dates and digits,breakfor pauses andphonemefor exact sounds. Support differs by provider, so check yours. - Spell names back and let the caller correct them. After the caller gives a name or code, read it back letter by letter with clear examples: "That's N, G, U, Y, E, N. Is that right?" Spelling is slow, so use it for names and codes that matter.
For engineers, a small normaliser makes the output predictable:
# Convert a phone number to speakable groups before sending it to TTS
def speak_phone(digits: str) -> str:
groups = [digits[:5], digits[5:8], digits[8:]]
return ", ".join(" ".join(g) for g in groups)
speak_phone("07700900123") # "0 7 7 0 0, 9 0 0, 1 2 3"
Before and after
Before: Your appointment is 4/5 at 15:30. The fee is $45.00. Your reference is BD-7Q2.
After: Your appointment is on Saturday, the fifth of April, at three thirty in the afternoon. The fee is forty-five dollars. Your reference is B, D, seven, Q, two.
What goes wrong
- The same date is read two ways, because the speech engine guesses between day-first and month-first.
- A brand name is mispronounced in every call because nobody added it to the dictionary.
- The agent reads a long reference code as a single word.
- SSML tags are inserted but the chosen voice or provider ignores them, and the tags are read aloud.
Examples
Reading back a booking reference
Agent: Your reference is B, D, seven, Q, two. Would you like me to repeat it?
Letters and digits are spoken one by one, in a short rhythm. The caller can write it down at that pace.
SSML for a date and a pause
<speak>
Your visit is on <say-as interpret-as="date" format="mdy">4/5/2025</say-as>.
<break time="400ms"/>
Your code is <say-as interpret-as="characters">BD7Q2</say-as>.
</speak>
The say-as tags remove the guesswork. Check that your speech provider supports them before relying on them.
Key points
- Text that reads well on screen, such as 4/5 or INV-2041, can be spoken wrongly because the engine has to guess.
- Write dates, money and codes in their spoken form, or instruct the model to do so, for anything important.
- Phone numbers and codes should be spoken in short groups, with a pause, at the pace a caller can write down.
- SSML and pronunciation dictionaries fix known problem words, but support differs by provider and must be tested.
- Spell back names and codes, then ask the caller to confirm, because mishearing them is costly.
Common mistakes
- Sending day/month/year dates in numeric form and trusting the engine to pick the right order.
- Reading a long reference code as one word instead of character by character.
- Adding SSML tags without checking that the chosen voice supports them, so they are read aloud.
- Fixing a mispronounced brand name in one reply instead of adding it to a pronunciation dictionary.
Check yourself · 2 of 3
The agent must give a caller the code 'K7Q2M'. Which spoken form is best?
Check yourself · 3 of 3
A voice agent keeps mispronouncing your company name in every call. Where is the most durable fix?
Practice items, not counted towards your mastery.
Start here
- Voice prompting guide (OpenAI API) (opens in a new tab)DocsFree
OpenAI's guide to prompting speech agents: brevity, tone, pace and how to structure a voice system prompt.
- Text to speech best practices (ElevenLabs docs) (opens in a new tab)DocsFree
Practical tips on writing text so the voice reads numbers, abbreviations and pauses correctly.
- Speech Synthesis Markup Language 1.1 (W3C) (opens in a new tab)StandardFree
The standard behind SSML tags such as say-as, break and phoneme.
Where to go in your country
- Article 50: Transparency obligations (EU AI Act) (opens in a new tab)DocsFreeEU
The EU rule that people must be told they are interacting with an AI system.