@langwatch/scenario
    Preparing search index...

    Function prepareJudgeInput

    • Run the automatic STT pre-pass over a judge's input messages.

      For every message carrying audio:

      1. If it already has a non-empty text part, reuse it (no STT call).
      2. Otherwise transcribe the audio chunk via the resolved STTProvider and prepend a { type: "text", text } part.
      3. When includeAudio is false, drop the audio file part(s) so only text survives; when true, keep them for a multimodal model.

      Non-audio messages pass through untouched. STT failures degrade gracefully — the audio part is dropped (text-only path) and a warning is logged; the judge still evaluates the rest of the conversation. The input array is never mutated — a new message list is returned.

      Parameters

      • args: PrepareJudgeInputArgs

      Returns Promise<JudgePreparedInput>