TTS language en-US vs en-GB on Sume: regional tags compare by language

For the voice-language check, Sume compares regional tags by primary language, so en-GB on an en-US voice does not trigger the 409, and fil matches tl.

5 min readSume
All posts

A regional tag does not cause a mismatch on Sume: the voice-language double-check compares regional tags by their primary language, so en-GB against a voice whose language is en passes, and fil and tl count as a match. A real mismatch, such as a Spanish script on an English voice, returns HTTP 409 tts_voice_language_mismatch before any job or charge, with voice_id, voice_language and request_language.

From docs/api/tts.md on origin/main b28f3b0 (read 2026-10-13).

How the check treats language pairs (read 2026-10-13)
Voice languageRequest languageResult
enen-GBMatch (primary language)
filtlMatch
enes409 tts_voice_language_mismatch
Unknown or unavailableAnyNo check; a raw voice ID can still be submitted

How do I confirm a deliberate mismatch?

Ask the user, then retry the same request and the same Idempotency-Key with confirm_language_mismatch: true in the body. Do not change the voice, transcript or target language. MCP tts_create shows the same event as a non-error tts_voice_language_warning with confirmation_required: true.

Does dry run catch it?

No. Cost-only MCP dry_run stays a preview; the double-check happens on submission, so a clean dry run is not a language approval. Where does the voice's own language come from? studio_agent_voices.language, set by voices_create.

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: es-line-001" \
  -d '{
    "transcript": "Envio gratis este fin de semana.",
    "voice": { "id": "YOUR_VOICE_ID" },
    "language": "es",
    "confirm_language_mismatch": true
  }'

Sources

Related posts

More in Developers

All Developers posts

Written by Sume