MCPcopy Create free account
hub / github.com/tmc/langchaingo / Load

Method Load

documentloaders/assemblyai.go:113–125  ·  view source on GitHub ↗

Load transcribes an audio file, transcribes it using AssemblyAI, and returns them transcript as a document.

(ctx context.Context)

Source from the content-addressed store, hash-verified

111// Load transcribes an audio file, transcribes it using AssemblyAI, and returns
112// them transcript as a document.
113func (a *AssemblyAIAudioTranscriptLoader) Load(ctx context.Context) ([]schema.Document, error) {
114 transcript, err := a.transcribe(ctx)
115 if err != nil {
116 return nil, err
117 }
118
119 docs, err := a.formatTranscript(ctx, transcript)
120 if err != nil {
121 return nil, err
122 }
123
124 return docs, nil
125}
126
127// transcribe conditionally transcribes an audio file based on the specified
128// source.

Callers 1

LoadAndSplitMethod · 0.95

Calls 2

transcribeMethod · 0.95
formatTranscriptMethod · 0.95

Tested by

no test coverage detected