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.

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.
| Engine | Formats stated | Sample rates stated | Source |
|---|---|---|---|
| Sume TTS 1.0 | mp3, wav, raw; pcm_s16le, pcm_f32le, pcm_mulaw, pcm_alaw | 8000, 16000, 22050, 24000, 44100, 48000 | Sume OpenAPI |
| Gemini 3.8 Flash TTS | audio/wav, audio/l16, audio/mulaw, audio/alaw | 24000, 16000, 8000 | ai.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
- Sume job webhook retries: 370 s worst case, then poll or redeliver
Sume retries a job webhook 10 times, 30 s apart, with a 10 s timeout each: 270 s of gaps and up to 370 s in total. What to do when the window closes.
- jobs_wait any on 20 Wan 3.0 clips: the other 19 still bill $5.94
With wait_for any, jobs_wait returns when one of 20 Wan 3.0 480p 5-second clips ends, but the other 19 keep running and billing: $5.9375 of $6.25.
- Kling Motion Control: a 30 s job reserves $4.73, refunded on failure
Sume reserves ceil(seconds) x $0.1575 for Kling 3.0 Motion Control: $4.725 for 30 s, shown as 473 cents. Failed or pre-generation canceled jobs are refunded.
- Korean ad with an English brand name: set Sume TTS language to ko
Send a Korean script with language set to ko; the default is English. A brand name in Latin letters is read by the chosen language, so listen and fix it.
Written by Sume