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.

4 min readSume
All posts

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.

Rates used by the calculator (read 2026-10-05)
OptionRateRoundingLimit
MAI-Voice-2.1$22 per 1M charactersNone appliedNot stated on the page I read
MAI-Voice-2.1-Flash$15 per 1M charactersNone appliedNot stated on the page I read
Sume TTS Router$0.0475 per 1,000 charactersUp to the next cent per job1 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

All Developers posts

Written by Sume