Load transcribes an audio file, transcribes it using AssemblyAI, and returns them transcript as a document.
(ctx context.Context)
| 111 | // Load transcribes an audio file, transcribes it using AssemblyAI, and returns |
| 112 | // them transcript as a document. |
| 113 | func (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. |
no test coverage detected