decolua/9router · error · Error

MiMo TTS returned no audio

Error message

MiMo TTS returned no audio

What it means

Thrown when the MiMo upstream returns HTTP OK but the response JSON has no choices[0].message.audio.data — i.e., the API accepted the request but returned no audio payload. The handler prefers data.error.message if present to hint at the cause.

Source

Thrown at open-sse/handlers/ttsProviders/xiaomi-mimo.js:59

      audio: {
        format: "wav",
        voice: voiceId || DEFAULT_VOICE,
      },
    }),
  });

  const rawText = await res.text();
  let data = {};
  if (rawText) {
    try { data = JSON.parse(rawText); } catch { data = {}; }
  }

  if (!res.ok) {
    throw new Error(data?.error?.message || rawText || `MiMo TTS error (${res.status})`);
  }

  const audio = data?.choices?.[0]?.message?.audio?.data;
  if (!audio) throw new Error(data?.error?.message || "MiMo TTS returned no audio");

  return {
    base64: audio,
    format: data?.choices?.[0]?.message?.audio?.format || "wav",
  };
}

View on GitHub (pinned to 90b52e06ff)

Solutions

  1. Log the full response JSON to inspect choices and any embedded error message
  2. Verify the account has MiMo TTS entitlement enabled
  3. Shorten/sanitize input text to rule out moderation or length limits
  4. Check for MiMo API version changes to the audio response shape
  5. Retry once to rule out a transient upstream hiccup
Defensive patterns

Strategy: fallback

Validate before calling

if (typeof text !== "string" || text.length === 0 || text.length > MAX_MIMO_INPUT) throw new Error("MiMo TTS: invalid input text");

Type guard

function mimoResponseHasAudio(d) {
  const a = d?.choices?.[0]?.message?.audio;
  return typeof a?.data === "string" && a.data.length > 0;
}

Try / catch

try {
  return await synthesizeMiMo(text, model, key, style, language);
} catch (e) {
  if (e.message === "MiMo TTS returned no audio") {
    logger.warn("mimo tts: empty audio in 200 response", { model });
    return fallbackTts(text);
  }
  throw e;
}

Prevention

When it happens

Trigger: MiMo returns 200 with an empty choices array, a text-only message, or an audio object missing data (e.g. content-filtered input, silent generation failure, or API response shape change).

Common situations: Input text blocked by content moderation, account without TTS entitlement returning an empty success, MiMo API version updating the audio field location, or extremely long input being truncated to no audio.

Related errors


AI-assisted analysis of decolua/9router@90b52e06ff (2026-08-30). Data as JSON: /api/errors/62340f9896dbaa2e. Report an issue: GitHub.