BerriAI/litellm · error · MinimaxException
No audio data in MiniMax response. Response keys: {list(resp
Error message
No audio data in MiniMax response. Response keys: {list(response_json.keys())} What it means
Error "No audio data in MiniMax response. Response keys: {list(response_json.keys())}" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/minimax/text_to_speech/transformation.py:339
# MiniMax returns audio in "data" field
data: Final = response_json.get("data", {})
# Check if response contains a URL (output_format='url')
audio_url: Final = data.get("audio_url", None)
if audio_url:
# If URL format is used, we need to fetch the audio from the URL
# For now, return a response indicating URL mode (TODO: fetch audio from URL)
raise MinimaxException(
status_code=500,
message=f"URL output format is not yet supported. Use 'hex' format or fetch from URL: {audio_url}",
headers=dict(raw_response.headers),
)
# Get hex-encoded audio data
audio_hex: Final = data.get("audio", "") or response_json.get("audio_file", "")
if not audio_hex:
raise MinimaxException(
status_code=500,
message=f"No audio data in MiniMax response. Response keys: {list(response_json.keys())}",
headers=dict(raw_response.headers),
)
# MiniMax returns hex-encoded audio by default
# Try hex decoding first, fall back to base64 if that fails
try:
audio_bytes = bytes.fromhex(audio_hex)
except ValueError:
# If hex decoding fails, try base64 (for older API versions)
try:
audio_bytes = base64.b64decode(audio_hex)
except Exception as e:
raise MinimaxException(
status_code=500,
message=f"Failed to decode audio data: {e}",
headers=dict(raw_response.headers),View on GitHub (pinned to 6c2dcb801b)
Solutions
- The MiniMax response had no audio data; check request parameters and response keys.
When it happens
Trigger: Thrown at litellm/llms/minimax/text_to_speech/transformation.py:339 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/b86338943df5c05a.
Report an issue: GitHub.