IVR phone menu prompts with TTS: 8 kHz mu-law WAV and cost per prompt

Make phone-menu prompts as 8 kHz mu-law or A-law WAV with Sume TTS. A 20-prompt menu bills 20 cents because each short job hits the 1-cent minimum.

4 min readSume
All posts

Sume TTS lets you set the output format per request. The OpenAPI schema lists wav or raw containers, an 8000 Hz sample rate, and pcm_mulaw or pcm_alaw encodings, which are the shapes phone systems usually want. A 20-prompt menu with prompts under 210 characters bills 20 cents, because every short job rounds up to the 1-cent minimum.

How do I ask Sume TTS for a mu-law phone file?

Set output_format on the request. The default is mp3 at 44,100 Hz and 128 kbps, so telephony needs an explicit override.

Treat the combination as something to prove with one prompt before you queue the whole menu. The schema lists each value on its own; it does not publish a table of which pairs a given voice accepts, so play the first file on your phone system before generating the other 19.

import json, os, urllib.request

body = {
    "transcript": "For sales, press 1. For support, press 2.",
    "avatar_handle": os.environ["SUME_VOICE_HANDLE"],
    "output_format": {"container": "wav", "sample_rate": 8000,
                      "encoding": "pcm_mulaw"},
    "mode": "async",
}
req = urllib.request.Request(
    "https://api.sume.com/v1/tts-1.0/generate",
    data=json.dumps(body).encode(),
    headers={"Authorization": "Bearer " + os.environ["SUME_API_KEY"],
             "Content-Type": "application/json",
             "Idempotency-Key": "ivr-main-menu-001"},
)
print(json.load(urllib.request.urlopen(req)))

How does that compare with the Gemini formats?

Gemini 3.8 Flash TTS lists a similar range of formats, so the two are comparable on this one point.

Telephony-relevant output options (read 2026-10-09)
EngineFormats statedSample rates statedSource
Sume TTS 1.0mp3, wav, raw; pcm_s16le, pcm_f32le, pcm_mulaw, pcm_alaw8000, 16000, 22050, 24000, 44100, 48000Sume OpenAPI
Gemini 3.8 Flash TTSaudio/wav, audio/l16, audio/mulaw, audio/alaw24000, 16000, 8000ai.google.dev speech generation page

What does a 20-prompt menu cost?

A one-sentence prompt such as "For sales, press 1." is about 21 characters, far below the 210 characters that fit inside the 1-cent minimum. Each prompt is its own job and bills 1 cent. Twenty prompts therefore cost 20 cents, and re-recording one wrong prompt later costs 1 cent.

Putting all 20 in one job would bill by characters instead: 3,000 characters is $0.1425, rounded up to 15 cents, and you would then need sentence segments to cut the prompts apart. For menus this short, separate jobs with their own idempotency keys are simpler. The reverse is true for hundreds of tiny lines, covered in the game dialogue post.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume