Prompt
How do I make a voice for IVR prompts using a TTS API?
Latest observation
To create an IVR voice with a TTS API, you usually want to optimize for clarity, speed, and phone-quality audio rather than “natural-sounding” narration.
1) Pick a TTS voice suited for telephony
Choose a voice that is:
- Clear and neutral
- Easy to understand at 8 kHz / narrowband audio
- Not too expressive or fast
If the API offers styles like:
- Conversational → usually less ideal for IVR
- Neutral / assistant / standard → usually best
- Expressive / emotional → usually avoid for menus
2) Write IVR-friendly text
IVR prompts should be:
- Short
- Unambiguous
- Phonetic where needed
Examples:
- “Press 1 for Sales.”
- “Please enter your 10-digit account number.”
- “Sorry, I didn’t catch that. Please try again.”
Tips:
- Use digits when you want them spoken individually or as numbers, depending on the API.
- Avoid long sentences.
- Add commas or SSML breaks for pacing.
3) Use SSML if supported
SSML helps you control delivery.
Example:
<speak>
Welcome to Acme support.
<break time="300ms"/>
Press 1 for sales.
<break time="200ms"/>
Press 2 for technical support.
</speak>
Useful SSML tags:
<break time="200ms"/>for pauses<say-as>for numbers, dates, telephone, etc.<prosody rate="slow">if the voice is too fast
Example for phone number:
<speak>
Please call <say-as interpret-as="telephone">5551234567</say-as>.
</speak>
4) Export in the right audio format
For IVR, the telephony platform often wants:
- WAV
- PCM µ-law or A-law
- 8 kHz sample rate
- Mono
Common IVR requirements:
- WAV container
- 8000 Hz
- 16-bit PCM or µ-law
- Mono channel
If your TTS API returns higher-quality audio, you may need to convert it before uploading to the IVR system.
Example FFmpeg conversion:
ffmpeg -i input.mp3 -ar 8000 -ac 1 -c:a pcm_mulaw output.wav
Or for linear PCM WAV:
ffmpeg -i input.mp3 -ar 8000 -ac 1 -c:a pcm_s16le output.wav
5) Keep prompts consistent
Use the same voice, speed, and style across:
- Greeting
- Menu options
- Error messages
- Confirmation prompts
Consistency makes the IVR feel polished and easier to understand.
6) Test on a real phone line
Always test:
- Landline
- Mobile
- VoIP
- Real IVR call flow
What sounds fine in studio audio may be less clear over telephone bandwidth.
7) Example workflow
- Write the prompt text
- Add SSML pauses
- Generate audio with TTS API
- Convert to telephony format
- Upload to IVR system
- Test and adjust
Example prompt
Text:
“Thank you for calling Acme. For sales, press 1. For support, press 2.”
SSML:
<speak>
Thank you for calling Acme.
<break time="250ms"/>
For sales, press 1.
<break time="200ms"/>
For support, press 2.
</speak>
If you want, I can also show you:
- a Python example using a specific TTS API,
- how to generate telephony-ready WAV files, or
- how to write better IVR prompt text.
Brands