Logo
Classes

AudioSubtitlesReader

Defined in: packages/readers/src/assembly-ai.ts:134

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

Extends

  • AssemblyAIReader

Constructors

Constructor

new AudioSubtitlesReader(assemblyAIOptions?): AudioSubtitlesReader

Defined in: packages/readers/src/assembly-ai.ts:33

Creates a new AssemblyAI Reader.

Parameters

assemblyAIOptions?

Partial<BaseServiceParams>

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

Returns

AudioSubtitlesReader

Inherited from

AssemblyAIReader.constructor

Properties

clientPromise

protected clientPromise: Promise<AssemblyAI>

Defined in: packages/readers/src/assembly-ai.ts:26

Inherited from

AssemblyAIReader.clientPromise

Methods

transcribeOrGetTranscript()

protected transcribeOrGetTranscript(params): Promise<Transcript>

Defined in: packages/readers/src/assembly-ai.ts:58

Parameters

params

string | TranscribeParams

Returns

Promise<Transcript>

Inherited from

AssemblyAIReader.transcribeOrGetTranscript


getTranscriptId()

protected getTranscriptId(params): Promise<string>

Defined in: packages/readers/src/assembly-ai.ts:67

Parameters

params

string | TranscribeParams

Returns

Promise<string>

Inherited from

AssemblyAIReader.getTranscriptId


loadData()

loadData(params, subtitleFormat): Promise<Document<Metadata>[]>

Defined in: packages/readers/src/assembly-ai.ts:141

Transcribe audio or get a transcript and reads subtitles for the transcript as srt or vtt format.

Parameters

params

The parameters to transcribe audio or get an existing transcript.

string | TranscribeParams

subtitleFormat

SubtitleFormat = "srt"

The format of the subtitles, either srt or vtt.

Returns

Promise<Document<Metadata>[]>

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

Overrides

AssemblyAIReader.loadData