A high-throughput and memory-efficient inference and serving engine for LLMs
Fix misleading error for audio duration limit rejection (#45113)
Signed-off-by: jperezde <jperezde@redhat.com>
Juan Pérez de Algaba committed
Jun 12, 2026 at 11:58 UTC
f715f25f290d2a610b142656eb0a4c99ae0d110d
2 files changed
+11
-6
vllm/entrypoints/speech_to_text/base/serving.py
+2
@@ -172,6 +172,8 @@ class OpenAISpeechToText(OpenAIServing):
172
sr=self.asr_config.sample_rate,
173
max_duration_s=self.max_audio_decode_duration_s,
174
)
175
+ except ValueError:
176
+ raise
177
except Exception as exc:
178
raise ValueError("Invalid or unsupported audio file.") from exc
179
vllm/multimodal/media/audio.py
+9
-6
@@ -92,8 +92,9 @@ def load_audio_pyav(
92
raise ValueError(
93
f"Audio exceeds maximum allowed duration of "
94
f"{max_duration_s}s (metadata reports "
95
- f"{metadata_duration_s:.1f}s). This limit "
96
- f"prevents decompression-bomb attacks."
95
+ f"{metadata_duration_s:.1f}s). Set "
96
+ f"VLLM_MAX_AUDIO_DECODE_DURATION_S to "
97
+ f"increase this limit."
98
)
99
100
max_samples = (
@@ -129,8 +130,9 @@ def load_audio_pyav(
130
raise ValueError(
131
f"Audio exceeds maximum allowed duration of "
132
f"{max_duration_s}s (decoded {total_samples} "
132
- f"samples at {sr}Hz). This limit prevents "
133
- f"decompression-bomb attacks."
133
+ f"samples at {sr}Hz). Set "
134
+ f"VLLM_MAX_AUDIO_DECODE_DURATION_S to "
135
+ f"increase this limit."
136
)
137
except (ValueError, ImportError):
138
raise
@@ -166,8 +168,9 @@ def load_audio_soundfile(
168
raise ValueError(
169
f"Audio exceeds maximum allowed duration of "
170
f"{max_duration_s}s (file contains "
169
- f"{file_duration_s:.1f}s at {native_sr}Hz). "
170
- f"This limit prevents decompression-bomb attacks."
171
+ f"{file_duration_s:.1f}s at {native_sr}Hz). Set "
172
+ f"VLLM_MAX_AUDIO_DECODE_DURATION_S to "
173
+ f"increase this limit."
174
)
175
y = f.read(dtype="float32", always_2d=False).T
176