Shayy
Shayy•3mo ago

Agent Doesn't Read numbers well

I'm having trouble having the voice agent read numbers aloud as whole number (ie. if the number is 2 or 400 it should read/ say aloud "two" or "four hundred") Sometimes the voice agent just skips the number as a whole so it sounds weird. Does anyone know how to fix this? THANK YOU IN ADVANCE 🙂
1 Reply
Tico | Voiceflow Assistant
If you want the phone/voice version of your agent to speak numbers as full words, give the TTS engine a little SSML guidance: 1. Edit the Talk (or Prompt) step that will pronounce the number. 2. Toggle “SSML mode” in the step-settings sidebar. 3. Wrap any number (or variable) with the cardinal tag:
<!-- hard-coded value -->
Your total is <say-as interpret-as="cardinal">400</say-as> dollars.

<!-- variable -->
Your total is <say-as interpret-as="cardinal">{{order_total}}</say-as> dollars.
<!-- hard-coded value -->
Your total is <say-as interpret-as="cardinal">400</say-as> dollars.

<!-- variable -->
Your total is <say-as interpret-as="cardinal">{{order_total}}</say-as> dollars.
• interpret-as="cardinal" = “four hundred”
• interpret-as="digits" = “four zero zero” (reads each digit)
A few tips
• SSML tags can sit around a variable; the variable itself doesn’t need SSML inside it.
• Make sure the whole step is in SSML mode—otherwise the tags will be spoken aloud.
• If the LLM is generating the sentence, you can prepend a system instruction such as
“When you mention numbers, format them with SSML <say-as interpret-as='cardinal'> tags.”
That’s all you need; the Twilio/Vonage voice will now say “two”, “four hundred”, etc., instead of skipping or reading the digits incorrectly. Docs: https://docs.voiceflow.com (→ Steps » Talk → SSML mode)
Voiceflow
Welcome to Voiceflow's docs
Build, manage, and deliver chat and voice agents for customer support and beyond.

Did you find this page helpful?