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
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:
⢠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)
⢠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.