BerriAI/litellm · error · ValueError

Error transforming Deepgram response: {e} Response: {raw_res

Error message

Error transforming Deepgram response: {e}
Response: {raw_response.text}

What it means

Error "Error transforming Deepgram response: {e} Response: {raw_response.text}" thrown in BerriAI/litellm.

Source

Thrown at litellm/llms/deepgram/audio_transcription/transformation.py:126

            detected_language: Final = first_channel.get("detected_language")
            response["language"] = detected_language if detected_language else "en"

            response["duration"] = response_json["metadata"]["duration"]

            # Transform words to match OpenAI format
            if "words" in first_alternative:
                response["words"] = [
                    {"word": word["word"], "start": word["start"], "end": word["end"]}
                    for word in first_alternative["words"]
                ]

            # Store full response in hidden params
            response._hidden_params = response_json

            return response

        except Exception as e:
            raise ValueError(f"Error transforming Deepgram response: {e}\nResponse: {raw_response.text}")

    def _reconstruct_diarized_transcript(self, words: list) -> str:
        """
        Reconstructs a diarized transcript from words with speaker information.

        Args:
            words: List of word objects with speaker, word, and optionally punctuated_word

        Returns:
            Formatted transcript with speaker labels
        """
        if not words:
            return ""

        segments: Final = []
        current_speaker = None
        current_words: list[str] = []

View on GitHub (pinned to 6c2dcb801b)

Solutions

  1. Inspect the Deepgram response body; check the audio format and request parameters.

When it happens

Trigger: Thrown at litellm/llms/deepgram/audio_transcription/transformation.py:126 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/7e7d5d86a78c202b. Report an issue: GitHub.