Python TTS cost calculator: MAI-Voice-2.1, Flash and Sume per job
A short Python function prices any script on MAI-Voice-2.1 ($22/M), Flash ($15/M) and Sume (list x 1.25, rounded up per job); 210 vs 211 characters shown.

This calculator prices a script on three options with the rates published on Microsoft's model page and in Sume's catalog. It reproduces Sume's cent rounding, so a 210-character script prints 1 cent and a 211-character script prints 2 cents.
The rates
Microsoft lists $22 per million characters for MAI-Voice-2.1 and $15 per million for Flash. Sume's TTS list rate is 38 micro-USD per character with a 1.25 multiplier, rounded up to whole cents per job, minimum 1 cent, maximum 95 cents at the 20,000-character request cap.
| Option | Rate | Rounding | Limit |
|---|---|---|---|
| MAI-Voice-2.1 | $22 per 1M characters | None applied | Not stated on the page I read |
| MAI-Voice-2.1-Flash | $15 per 1M characters | None applied | Not stated on the page I read |
| Sume TTS Router | $0.0475 per 1,000 characters | Up to the next cent per job | 1 to 20,000 characters per request |
The code
Pure arithmetic: it needs no API key and makes no network call. Count characters as JavaScript would if you want to match the API; for plain ASCII scripts len() agrees.
import math
def sume_cents(n):
return min(95, max(1, math.ceil(n * 38 * 1.25 / 10000 - 1e-9)))
def price(n):
return {
"sume_usd": sume_cents(n) / 100,
"mai_usd": n * 22 / 1e6,
"flash_usd": n * 15 / 1e6,
}
for n in (60, 210, 211, 1000, 20000):
print(n, price(n))Expected output
- 60 characters: Sume $0.01, MAI $0.00132, Flash $0.0009
- 210 characters: Sume $0.01
- 211 characters: Sume $0.02
- 1,000 characters: Sume $0.05, MAI $0.022, Flash $0.015
- 20,000 characters: Sume $0.95, MAI $0.44, Flash $0.3
What it does not model
It ignores taxes, Microsoft's invoicing, any volume tier and anything beyond the TTS line. It also assumes the plain character count is what both vendors bill; Sume counts as JavaScript string length, so emoji and some accented text count differently.
Sources
Related posts
More in Developers
- Test a video poll loop with unittest and a local server, no spend
A 30-line stdlib file tests a Sume video poll loop against a fake server: pending, in_progress, completed in order, and a failed job that stops with no sleep.
- Python urllib only: a Wan 3.0 test job for $0.125
No requests, no SDK: 27 lines of Python urllib submit a 2-second 480p Wan 3.0 job, poll it and save the MP4. The job costs $0.125, the cheapest Wan clip.
- Queue a 30 s H3 Max Recast job: the reserve at 768p and 1080p
H3 Max Recast swaps people in a 5 to 30 s video. Price arithmetic for a 30 s source at 768p and 1080p, plus the Python to submit it and poll it.
- queue_admission_unavailable: a failed Sume job you can retry
If Sume cannot evaluate generation admission, the job fails with queue_admission_unavailable, retryable true, and is refunded. Read it, then create again.
Written by Sume