Creates a transcript for the given CreateTranscriptParameters.audio_url, and loads the sentences of the transcript, creating a document for each sentence.

Hierarchy

  • CreateTranscriptLoader
    • AudioTranscriptSentencesLoader

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 AudioTranscriptSentencesLoader

Properties

client: AssemblyAI
CreateTranscriptParameters?: CreateTranscriptParameters
transcriptId?: string

Methods

  • Creates a transcript and loads the sentences of the transcript, creating a document for each sentence.

    Returns Promise<Document<TranscriptSentence>[]>

    A promise that resolves to an array of documents, each containing a sentence of the transcript.

  • 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