BerriAI/litellm · error · SonioxException
Soniox transcription requires one of: a file argument, an `a
Error message
Soniox transcription requires one of: a file argument, an `audio_url` kwarg, or a `file_id` kwarg.
What it means
Soniox transcription input guard: neither a file argument, an audio_url handler option, nor a file_id (of an already-uploaded file) was provided, so there is no audio source to transcribe and SonioxException is raised.
Source
Thrown at litellm/llms/soniox/audio_transcription/handler.py:352
http_client: Final = (
client
if isinstance(client, HTTPHandler)
else (
_get_httpx_client(
params={"ssl_verify": litellm_params.get("ssl_verify", None)},
)
)
)
file_id = handler_opts.get("file_id")
uploaded_file_id: str | None = None
transcription_id: str | None = None
try:
if not file_id and not handler_opts.get("audio_url"):
if audio_file is None:
raise SonioxException(
message=(
"Soniox transcription requires one of: a file argument, "
"an `audio_url` kwarg, or a `file_id` kwarg."
),
status_code=400,
headers=None,
)
uploaded_file_id = self._sync_upload_file(
http_client=http_client,
base_url=base_url,
auth_headers=auth_headers,
audio_file=audio_file,
filename_override=handler_opts.get("filename_override"),
timeout=timeout,
provider_config=provider_config,
)
file_id = uploaded_file_id
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Pass a file argument, an audio_url kwarg, or a file_id kwarg to the transcription call.
Example fix
litellm.transcription(model="soniox/...", file=open("a.wav","rb")) # or audio_url=... / file_id=... Defensive patterns
Strategy: validation
When it happens
Trigger: Triggered when Soniox transcription is called without a file argument, audio_url kwarg, or file_id kwarg.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/2303562d50c5f486.
Report an issue: GitHub.