TTS voice-language mismatch warning: confirm, then retry
Sume's TTS warns when a voice's language differs from `language`. No job or charge exists yet; after the user agrees, retry with `confirm_language_mismatch`.

The warning means the voice you chose has a different primary language from the language you requested, so the speech may sound unnatural. Nothing has been created yet: Sume's text says no job or charge exists. If the user confirms, send the same request and the same idempotency key again with confirm_language_mismatch set to true.
Do not switch the voice, translate the transcript, or confirm on the user's behalf. That is the instruction in the warning's own next steps.
Why does this matter more now?
Cartesia's multilingual voices guide (read 2026-09-30) says one voice can speak several languages and accents, and that you can read a voice's accents list through its Get Voice call to see which. So a voice that is multilingual on the vendor side is a normal thing to pair with another language. Sume's check compares the voice's primary language, so a pairing can still raise the warning; the warning asks for a human decision, it does not say the result will be wrong.
What does the warning contain?
| Field | Meaning |
|---|---|
code | tts_voice_language_mismatch, severity warning |
voice_id | The voice you asked for |
voice_language | The voice's primary language |
request_language | The language you sent |
message | A double-check ending with "Would you like to proceed with this voice?" |
How do I confirm and retry?
Show the message to the person who owns the request and wait. The request schema describes confirm_language_mismatch as set true only after the user confirms the warning, to be omitted on the first request, and says confirmation does not change the voice or language. Reuse the same idempotency key so the retry is the same request. MCP callers see the warning as tts_voice_language_warning and retry with payload.confirm_language_mismatch=true.
curl -X POST https://api.sume.com/v1/tts-1.0/generate \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: mismatch-demo-001" \
-d '{
"transcript": "Aapka order confirm ho gaya hai.",
"avatar_handle": "acme",
"language": "hi",
"confirm_language_mismatch": true
}'When should I not just confirm?
If the mismatch is a mistake, fix the request instead: pick a voice that speaks the language, or correct language. Confirm only when the user knowingly wants that voice for that text, for example a deliberate accent. For general spelling and word fixes, see Text to speech pronunciation; for why a retry must reuse its key, see idempotency keys for AI video APIs.
Sources
Related posts
More in Developers
- Twitch 2K clips: trim a 1440p clip without setting output
Video trim's output width and height are limited to 256-2160, so a 2560-wide 1440p clip cannot be conformed. Omit output and the source size is kept.
- Vercel 413 FUNCTION_PAYLOAD_TOO_LARGE with Sume video
Vercel Functions cap request and response bodies at 4.5 MB. Do not proxy a generated video through one; hand the client the media.sume.com URL instead.
- AI SDK addToolOutput clears approval: Sume idempotency_key
AI SDK 7.0.126 clears tool approvals when addToolOutput runs. If a paid Sume call replays, a stable idempotency_key is what guards the create.
- AI SDK SSE heartbeat vs Sume jobs_wait 55s slices
AI SDK 7.0.123 adds optional SSE heartbeats for idle UI streams. Sume's jobs_wait is capped at 55s per call, so you still repeat it with the same ids.
Written by Sume