Ana içeriğe geç

Class: AudioSubtitlesReader

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

Hierarchy

  • AssemblyAIReader

    AudioSubtitlesReader

Constructors

constructor

new AudioSubtitlesReader(assemblyAIOptions?)

Creates a new AssemblyAI Reader.

Parameters

NameTypeDescription
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.

Inherited from

AssemblyAIReader.constructor

Defined in

packages/core/src/readers/AssemblyAI.ts:25

Properties

client

Protected client: AssemblyAI

Inherited from

AssemblyAIReader.client

Defined in

packages/core/src/readers/AssemblyAI.ts:18

Methods

getTranscriptId

Protected getTranscriptId(params): Promise<string>

Parameters

NameType
paramsstring | TranscribeParams

Returns

Promise<string>

Inherited from

AssemblyAIReader.getTranscriptId

Defined in

packages/core/src/readers/AssemblyAI.ts:52


loadData

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

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

Parameters

NameTypeDefault valueDescription
paramsstring | TranscribeParamsundefinedThe parameters to transcribe audio or get an existing transcript.
subtitleFormatSubtitleFormat"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

Defined in

packages/core/src/readers/AssemblyAI.ts:124


transcribeOrGetTranscript

Protected transcribeOrGetTranscript(params): Promise<Transcript>

Parameters

NameType
paramsstring | TranscribeParams

Returns

Promise<Transcript>

Inherited from

AssemblyAIReader.transcribeOrGetTranscript

Defined in

packages/core/src/readers/AssemblyAI.ts:44