Creates and loads the transcript as a document using AssemblyAI.

Example

const loader = new AudioTranscriptLoader(
{ audio_url: "https:
{ apiKey: "ASSEMBLYAI_API_KEY" },
);
const docs = await loader.load();
console.dir(docs, { depth: Infinity });

Hierarchy

  • CreateTranscriptLoader
    • AudioTranscriptLoader

Constructors

  • Retrevies an existing transcript by its ID.

    Parameters

    • params: string | CreateTranscriptParameters

      The parameters to create the transcript, or the ID of the transcript to retrieve.

    • 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 AudioTranscriptLoader

Properties

client: AssemblyAI
CreateTranscriptParameters?: CreateTranscriptParameters
transcriptId?: string

Methods

  • Creates a transcript and loads the transcript as a document using AssemblyAI.

    Returns Promise<Document<Transcript>[]>

    A promise that resolves to a single document containing the transcript text as the page content, and the transcript object as the metadata.

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

    Parameters

    Returns Promise<Document<Record<string, any>>[]>

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

  • Returns Promise<any>

Generated using TypeDoc