IVR text to speech: phone menu prompts in telephony formats

Make IVR prompts and voicemail greetings with text to speech: one request per prompt, returned as 8 kHz μ-law or A-law WAV, or as MP3 or other PCM.

5 min readSume
All posts

IVR text to speech turns each phone-menu prompt or voicemail greeting from written text into an audio file your phone system can play. Write each prompt as its own short text, synthesize it once, and request the format your system expects. Sume's TTS API returns MP3 by default and can instead return WAV or raw PCM at one of six sample rates from 8,000 to 48,000 Hz, including 8 kHz audio in μ-law or A-law encoding.

The fields come from the TTS schema in the Sume API reference, the OpenAPI document behind the API reference docs, and the Jobs and results docs, read on 2026-09-27. The price is read from the code behind API pricing.

Which audio format does my phone system need?

Check your phone system's documentation for three things: the sample rate, the encoding, and the file type. Classic telephone audio is sampled at 8 kHz, and μ-law and A-law are the two 8-bit encodings of G.711, the codec of the traditional phone network. Then set output_format to match:

  • wav returns a WAV file. In the current code, raw returns the bare PCM samples with no file header, for systems that ask for headerless audio, and a raw request must name both sample_rate and encoding.
  • encoding applies to wav and raw. bit_rate applies to mp3, where it's required when you change the defaults.
The output_format fields in the TTS request schema of the Sume API reference, read 2026-09-27.
FieldValues
containermp3 (default), wav, or raw
sample_rate8000, 16000, 22050, 24000, 44100 (default), or 48000 Hz
encodingFor wav or raw: pcm_mulaw, pcm_alaw, pcm_s16le, or pcm_f32le
bit_rateFor mp3: 32000, 64000, 96000, 128000 (default), or 192000

How do I generate one prompt?

Send one POST /v1/tts-1.0/generate per prompt, with a voice: the avatar_id or avatar_handle of an avatar whose voice is ready, or a voice.id you already hold. This request returns the main menu as 8 kHz μ-law WAV, slowed a little with a speed multiplier of 0.9:

  • The default async mode answers at once with a job id and status_url. Poll it until terminal is true, then read result_url; the completed result exposes the audio as a media.sume.com artifact to download and load into your phone system.
  • Or send a public HTTPS webhook_url to be called when the job ends, and keep polling as a backup.
  • Leave out timestamps and segmentation: phone prompts don't need word timings.
curl -X POST https://api.sume.com/v1/tts-1.0/generate \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ivr-main-menu-v3" \
  -d '{
    "transcript": "Thank you for calling Acme. For sales, press 1. For support, press 2.",
    "avatar_handle": "acme_support",
    "language": "en",
    "output_format": { "container": "wav", "encoding": "pcm_mulaw", "sample_rate": 8000 },
    "generation_config": { "speed": 0.9 }
  }'

How should I organize a set of prompts?

  • One request per prompt: greeting, main menu, each submenu, hold message, after-hours message, voicemail greeting. Changing one prompt is then one new request.
  • The same voice, language, output_format, and generation_config for every prompt in the set.
  • generation_config.speed (0.6–1.5) and volume (0.5–2.0) are multipliers for pace and level.
  • A versioned Idempotency-Key per prompt text, such as ivr-main-menu-v3. The same key with the same body returns the original job; the same key with a changed body answers 409 idempotency_conflict, so bump the version when you edit the text.
  • language on every non-English prompt. Omitted, it defaults to English.

How much does IVR text to speech cost?

Text to speech is billed per transcript character at $0.0475 per 1,000 characters, spaces and punctuation included, plus a 5.5% agent fee by default. Each prompt is its own request, billed on its own characters, and a request takes up to 20,000 characters.

What doesn't Sume's TTS do for an IVR?

  • Run the phone system. The API returns audio files; answering calls, reading keypresses, and routing callers stay in your IVR platform.
  • Speak live. TTS 1.0 is an async job you poll or get a webhook for, not a stream, so generate prompts ahead of time rather than during a call.
  • Check your platform's requirements. Load one prompt into your phone system and test it before you generate the full set.

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume