Member Junction
    Preparing search index...

    Class BaseAudioGeneratorAbstract

    Base class for all audio generation models. Each AI model will have a sub-class implementing the abstract methods in this base class. Not all sub-classes will support all methods. If a method is not supported an exception will be thrown, use the GetSupportedMethods method to determine what methods are supported by a specific sub-class.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    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>