{"record":{"id":"4798931748993b91","repo":"BerriAI/litellm","slug":"audio-decode-produced-no-samples","errorCode":null,"errorMessage":"Audio decode produced no samples.","messagePattern":"Audio decode produced no samples\\.","errorType":"exception","errorClass":"NvidiaRivaException","httpStatus":400,"severity":"error","filePath":"litellm/llms/nvidia_riva/audio_transcription/audio_utils.py","lineNumber":140,"sourceCode":"            ),\n        ) from e\n\n    # audioread backends (FFmpeg subprocess, GStreamer, Core Audio) require a\n    # filesystem path, so spill the bytes to a temp file. mkstemp is portable\n    # to Windows where re-opening a NamedTemporaryFile is not allowed.\n    fd, tmp_path = tempfile.mkstemp(suffix=\".audio\")\n    try:\n        with os.fdopen(fd, \"wb\") as tmp_file:\n            tmp_file.write(file_bytes)\n        try:\n            with audioread.audio_open(tmp_path) as src:\n                source_rate = int(src.samplerate)\n                channels: Final = int(src.channels)\n                chunks: Final = []\n                for buf in src:\n                    chunks.append(np.frombuffer(buf, dtype=np.int16))\n                if not chunks:\n                    raise NvidiaRivaException(\n                        status_code=400,\n                        message=\"Audio decode produced no samples.\",\n                    )\n                interleaved = np.concatenate(chunks).astype(np.float32) / 32768.0\n                if channels > 1:\n                    interleaved = interleaved.reshape(-1, channels)\n                return cast(\"FloatArray\", interleaved), source_rate\n        except NvidiaRivaException:\n            raise\n        except Exception as e:\n            raise NvidiaRivaException(\n                status_code=400,\n                message=(\n                    \"Could not decode audio for Riva STT. Convert your audio to \"\n                    f\"wav/flac/ogg before calling the API. Underlying error: {e}\"\n                ),\n            ) from e\n    finally:","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/nvidia_riva/audio_transcription/audio_utils.py#L122-L158","documentation":"Error \"Audio decode produced no samples.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/nvidia_riva/audio_transcription/audio_utils.py:140 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply a non-empty, valid audio file; the decoded buffer contained zero samples."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}