tts_create dry_run will not warn about a voice-language mismatch

A cost-only dry_run on Sume's tts_create stays a preview; the language double-check runs on submission. How to preflight voice, language and cost together.

4 min readSume
All posts

Sume's hosted MCP tts_create tool has a cost-only dry_run. It answers what a job would cost, and it is useful for capping a batch. It is not a full validation of the request. Sume's TTS documentation says a dry run stays a preview and that the voice-language double-check occurs on submission.

What each step checks

  • Dry run: the character count and the price estimate.
  • Submit: voice and language resolution, then the mismatch check.
  • Mismatch found: no job, no charge. REST returns 409 tts_voice_language_mismatch; MCP returns a tts_voice_language_warning with confirmation_required: true.

A preflight that covers both

Run the dry run first for the budget. Then submit a short probe, such as the first sentence of the script, with the real voice and language. If the probe returns the warning, you learn about the mismatch for the cost of one cent instead of a full job. If it succeeds, listen to the probe, then submit the whole script.

A script to probe a voice

The Python below sends a short probe over REST and prints any 409 body. It needs SUME_API_KEY and a voice id in your environment.

import os
import uuid

import requests

resp = requests.post(
    "https://api.sume.com/v1/tts-1.0/generate",
    headers={
        "Authorization": "Bearer " + os.environ["SUME_API_KEY"],
        "Idempotency-Key": "probe-" + str(uuid.uuid4()),
    },
    json={
        "transcript": "Hola, bienvenidos.",
        "voice": {"mode": "id", "id": os.environ["VOICE_ID"]},
        "language": "es",
    },
    timeout=30,
)
print(resp.status_code)
print(resp.json())

When to override

If the user confirms the odd pairing, retry with the same idempotency key and confirm_language_mismatch: true. Do not change the voice, transcript or language in the retry. A matching language adds no extra step.

Related posts

More in Agents

All Agents posts

Written by Sume