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.

    Registered against BaseSpeechToText under the key model metadata names. It still extends, and is registered against, BaseAudioGenerator, so callers that resolve it through the old base keep working.

    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 to text using one of Groq's Whisper models.

      Pieces of split audio are transcribed sequentially, not in parallel: Groq rate limits 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.

      params.CancellationToken is passed to each piece's request, and no further piece is sent once it aborts; the failure is then classified as a cancellation.

      Parameters

      Returns Promise<SpeechResult>

    • Transcribes audio that may exceed the provider's upload ceiling, splitting it first when it does. See TranscribeAudioWithSplitting, which this calls, for the behavior.

      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, cancellationToken?: AbortSignal) => Promise<TranscriptionPiece>

        Transcribes a single piece already known to be within the ceiling, and is handed cancellationToken to forward to its request

      • OptionalcancellationToken: AbortSignal

        Cancels the transcription: no further piece is sent once it aborts

      Returns Promise<TranscriptionPiece>