Member Junction
    Preparing search index...

    Groq implementation of BaseAudioGenerator, covering speech-to-text via Whisper.

    Groq offers no text-to-speech surface, so CreateSpeech and the voice/dictionary methods are not supported — GetSupportedMethods reports exactly what works.

    Whisper on Groq does not do speaker diarization. There is no parameter for it and no way to emulate it from the response, so a caller that needs speaker labels needs a different provider (AssemblyAI, Deepgram) rather than a flag here.

    Audio above Groq's 25MB upload ceiling requires an AudioSplitter, assigned to Splitter. Without one, oversized audio fails with a message naming the option rather than silently transcribing a truncated prefix.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Splitter: AudioSplitter = null

    Optional splitter used only when the audio exceeds Groq's upload ceiling. See AudioSplitter for why this is injected rather than bundled.

    Accessors

    • get apiKey(): string

      Only sub-classes can access the API key

      Returns string

    Methods

    • Transcribes audio that may exceed the provider's upload ceiling, splitting it first when it does, and joins the pieces back into one transcript and one duration.

      Pieces are transcribed sequentially, not in parallel: transcription providers rate limit by audio-seconds per minute, so firing an hour of audio at once buys nothing but 429s, and a partial failure mid-way would leave a transcript with an unmarked hole in it.

      The returned durationSeconds is the sum across pieces — which is what the provider bills — and is left undefined if ANY piece failed to report one, since a partial sum would understate the bill while looking like a complete answer.

      Parameters

      • audio: Buffer

        The full audio to transcribe

      • maxUploadBytes: number

        The provider's hard upload ceiling

      • splitTargetBytes: number

        Target piece size, below the ceiling to leave room for multipart framing

      • splitter: AudioSplitter

        Splitter to use for oversized audio; may be null, in which case oversized audio fails

      • providerLabel: string

        Provider name, used in the size-limit error messages

      • transcribeOne: (piece: Buffer) => Promise<TranscriptionPiece>

        Transcribes a single piece already known to be within the ceiling

      Returns Promise<TranscriptionPiece>