Mixed-language script: one Sume TTS request per language, then concat
A script that switches language mid-way needs one TTS request per language on Sume. Join up to 20 parts with timeline audio at $0.01.

Sume's tts_create takes one language and one voice per request, so a script that switches language needs one request per language, with a voice tagged for each. Then join the audio files in order with timeline audio, which concatenates up to 20 parts for a flat $0.01. Do not send a mixed script to a single voice: the language check warns on a mismatch, and the output will not be what you want.
How to split
Break the script at every language switch into parts, and list each as a language, a voice and a transcript. Keep each part a full sentence, since a voice that starts mid-sentence can sound clipped. If you have more than 20 parts, concatenate in two rounds.
| Item | Limit or price |
|---|---|
| Transcript per request | Up to 20,000 characters |
| TTS price | $0.0475 per 1,000 characters |
| Parts per concat | Up to 20 |
| Concat price | $0.01 flat |
Checking the join
Listen at each seam. If the volume or pace differs between voices, use generation_config with speed (0.6 to 1.5) and volume (0.5 to 2) on the quieter part. See timeline audio for the concat shape, and MCP tools and gates for the TTS fields.
Sources
Related posts
More in Developers
- Per-customer spend caps on Sume: what Sume caps, what you log
A Sume key belongs to a workspace, not your end customer. Cap each run with generation_spend_cap_usd and keep a per-customer ledger yourself.
- Perplexity Decisions API as a publish gate for Sume output
Check a finished Sume Format image with Perplexity's Decisions API before it ships: base64 data URL, one yes/no question, a threshold, and a human-review lane.
- Pocket TTS API: run it yourself or call a hosted TTS API
Kyutai's Pocket TTS installs with pip and serves from localhost. If you want a hosted API with job URLs instead, here is the Sume request and what changes.
- Prefect 3 task retries for a Sume job: same Idempotency-Key
Retry a Sume image job in Prefect 3 without paying twice: a tested flow with retry_condition_fn, delay list and an order-derived idempotency key.
Written by Sume