sgl-project/sglang · error · ValueError
MiniMax H3 audio material has no usable sample rate
Error message
MiniMax H3 audio material has no usable sample rate
What it means
The MiniMax H3 audio material has no usable sample rate. Re-encode the audio with a valid sample rate.
Solutions
- Re-encode the audio with explicit rate: ffmpeg -i in.wav -ar 44100 out.wav
- Fix at the producing side so the audio header carries sample_rate
- Validate sample_rate > 0 via ffprobe before submission
Defensive patterns
Strategy: validation
Validate before calling
assert all(int(s.get("sample_rate") or 0) > 0 for s in audio_streams) Prevention
- Re-encode audio with explicit -ar 44100
When it happens
Trigger: Audio streams where ffprobe omits sample_rate or reports 0 — some raw/ADPCM streams or container-muxed audio without a header.
Common situations: PCM-in-MOV without rate metadata, streams produced by experimental muxers, or truncated audio tracks.
Related errors
- MiniMax H3 audio material has no usable channel count
- reference audio sample rate must be positive
- audio_sr must be positive, got
- ffprobe failed for final MiniMax H3 output
- ffprobe is required to validate final MiniMax H3 output
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/14a824663b597f27.
Report an issue: GitHub.
Appendix: source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/minimax_h3/material_io.py:454
) from exc
if width <= 0 or height <= 0:
raise ValueError("MiniMax H3 video material has no positive dimensions")
fps = _parse_frame_rate(stream.get("avg_frame_rate")) or _parse_frame_rate(
stream.get("r_frame_rate")
)
if fps <= 0:
raise ValueError("MiniMax H3 video material has no usable frame rate")
if primary_video is None:
primary_video = stream
for stream in audio_streams:
try:
sample_rate = int(stream.get("sample_rate") or 0)
channels = int(stream.get("channels") or 0)
except (TypeError, ValueError) as exc:
raise ValueError("MiniMax H3 audio material has invalid metadata") from exc
if sample_rate <= 0:
raise ValueError("MiniMax H3 audio material has no usable sample rate")
if channels <= 0:
raise ValueError("MiniMax H3 audio material has no usable channel count")
durations: list[float] = []
for value in [
(payload.get("format") or {}).get("duration"),
*(stream.get("duration") for stream in streams),
]:
if value in {None, "", "N/A"}:
continue
try:
duration = float(value)
except (TypeError, ValueError):
continue
if math.isfinite(duration) and duration > 0:
durations.append(duration)
if not durations:
raise ValueError("MiniMax H3 media material has no positive duration")View on GitHub (pinned to 0132848349)