Transcribe audio and load subtitles for the transcript as srt or vtt format.

Hierarchy

  • CreateTranscriptLoader
    • AudioSubtitleLoader

Constructors

  • Create a new AudioSubtitleLoader.

    Parameters

    • transcribeParams: TranscriptParams | TranscribeParams

      The parameters to transcribe audio.

    • subtitleFormat: SubtitleFormat

      The format of the subtitles, either srt or vtt.

    • Optional assemblyAIOptions: AssemblyAIOptions

      The options to configure the AssemblyAI loader. Configure the assemblyAIOptions.apiKey with your AssemblyAI API key, or configure it as the ASSEMBLYAI_API_KEY environment variable.

    Returns AudioSubtitleLoader

  • Create a new AudioSubtitleLoader.

    Parameters

    • transcriptId: string

      The ID of the transcript to retrieve.

    • subtitleFormat: SubtitleFormat

      The format of the subtitles, either srt or vtt.

    • Optional assemblyAIOptions: AssemblyAIOptions

      The options to configure the AssemblyAI loader. Configure the assemblyAIOptions.apiKey with your AssemblyAI API key, or configure it as the ASSEMBLYAI_API_KEY environment variable.

    Returns AudioSubtitleLoader

Properties

client: AssemblyAI
transcribeParams?: TranscriptParams | TranscribeParams
transcriptId?: string

Methods

  • Transcribe audio and load subtitles for the transcript as srt or vtt format.

    Returns Promise<Document[]>

    A promise that resolves a document containing the subtitles as the page content.

  • Loads the documents and splits them using a specified text splitter.

    Parameters

    • splitter: TextSplitter = ...

    Returns Promise<Document[]>

    A Promise that resolves with an array of Document instances, each split according to the provided TextSplitter.

Generated using TypeDoc