conscious-sapphire
conscious-sapphire3mo ago

Weird problem...my agent refuses to say a phone number correctly.

I have a simple agent that takes pizza orders. If the caller needs further assistance my agent is supposed to say "please call 310-555-5555" But strangely, it will not say the entire phone number correctly no matter what I do. It screws up the "0" in the number and says some mumbo jumbo. Then if you ask it to repeat the number it rushes through the number like there's a weird fast glitch. I've tried changing LLMs and every one does the same thing. Any ideas?
9 Replies
Vapi
Vapi3mo ago
Try disabling the default voice formatting for phone numbers, which may be causing the mispronunciation.
Add this to your assistant configuration:
"voice": {
"chunkPlan": {
"formatPlan": {
"enabled": false
}
}
}
"voice": {
"chunkPlan": {
"formatPlan": {
"enabled": false
}
}
}
This will make the TTS read the phone number exactly as written in your prompt, which should resolve the issue with "310-555-5555" being spoken incorrectly.
See documentation for details. Source: - Voice Formatting Plan documentation
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
Vapi
Vapi3mo ago
Try disabling the default voice formatting for phone numbers, which may be causing the mispronunciation.
Add this to your assistant configuration:
"voice": {
"chunkPlan": {
"formatPlan": {
"enabled": false
}
}
}
"voice": {
"chunkPlan": {
"formatPlan": {
"enabled": false
}
}
}
This will make the TTS read the phone number exactly as written in your prompt, which should resolve the issue with "310-555-5555" being spoken incorrectly.
See documentation for details. Source: - Voice Formatting Plan documentation
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
conscious-sapphire
conscious-sapphireOP3mo ago
ok do i put that code right into the system prompt area?
ratty-blush
ratty-blush3mo ago
You can place the SSML or spaced-digit format directly in the system prompt to improve phone number pronunciation..
conscious-sapphire
conscious-sapphireOP3mo ago
@Duckie ok do i put that code right into the system prompt area? What do you mean by SSML?
Vapi
Vapi3mo ago
No, do not put that code in the system prompt area.
Instead, add the following configuration to your assistant's JSON settings (outside the prompt text):
"voice": {
"chunkPlan": {
"formatPlan": {
"enabled": false
}
}
}
"voice": {
"chunkPlan": {
"formatPlan": {
"enabled": false
}
}
}
This change should be made in your assistant's configuration file or via the API, not in the prompt or message content.
See documentation for details. Source: - Voice Formatting Plan documentation No, do not put that code in the system prompt area.
Instead, add the following configuration to your assistant's JSON settings (outside the prompt text):
"voice": {
"chunkPlan": {
"formatPlan": {
"enabled": false
}
}
}
"voice": {
"chunkPlan": {
"formatPlan": {
"enabled": false
}
}
}
This change should be made in your assistant's configuration file or via the API, not in the prompt or message content.
See documentation for details. Source: - Voice Formatting Plan documentation
ratty-blush
ratty-blush3mo ago
Speech Synthesis Markup Language (SSML) is a markup language used to control how text is spoken by AI voices, like ensuring phone numbers are read as individual digits or in standard formats, which improves pronunciation..
conscious-sapphire
conscious-sapphireOP3mo ago
Cool, how do I use that within Vapi?
ratty-blush
ratty-blush3mo ago
Choose a TTS provider that supports SSML like Azure, wrap your assistant’s responses in <speak>...</speak> with tags like <say-as> or <break>, and send it via the Vapi API or SDK using type: "ssml" to control pronunciation, pacing, and emphasis..

Did you find this page helpful?