chenhg5/cc-connect · error
mimo tts: empty audio data in response
Error message
mimo tts: empty audio data in response
What it means
MiMo TTS returned a 200 with parseable JSON but no audio: the choices array is empty or choices[0].message.audio.data is an empty string. Guard against synthesizing an empty/invalid voice message downstream.
Source
Thrown at core/tts.go:517
Audio struct {
Data string `json:"data"`
} `json:"audio"`
} `json:"message"`
} `json:"choices"`
Error *struct {
Message string `json:"message"`
Type string `json:"type"`
Code any `json:"code"`
} `json:"error"`
}
if err := json.Unmarshal(body, &result); err != nil {
return nil, "", fmt.Errorf("mimo tts: parse response: %w", err)
}
if result.Error != nil && result.Error.Message != "" {
return nil, "", fmt.Errorf("mimo tts API error: %s", result.Error.Message)
}
if len(result.Choices) == 0 || result.Choices[0].Message.Audio.Data == "" {
return nil, "", fmt.Errorf("mimo tts: empty audio data in response")
}
audio, err := base64.StdEncoding.DecodeString(result.Choices[0].Message.Audio.Data)
if err != nil {
return nil, "", fmt.Errorf("mimo tts: decode audio base64: %w", err)
}
return audio, "wav", nil
}
// ──────────────────────────────────────────────────────────────
// EspeakTTS — Local eSpeak text-to-speech implementation
// ──────────────────────────────────────────────────────────────
// EspeakTTS implements TextToSpeech using the local espeak command.
type EspeakTTS struct {
Path string // path to espeak executable (empty = "espeak")
Voice string // default voice (e.g. "zh", "en", "zh+f3")
}View on GitHub (pinned to 4000b2338a)
Solutions
- Retry; shorten the input text
- Verify the configured TTS model/voice is supported
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at core/tts.go:517 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06).
Data as JSON: /api/errors/711fca64f981bc29.
Report an issue: GitHub.