Skip to main content

Open AI Whisper Audio

Compatibility

Only available on Node.js.

This covers how to load document objects from an audio file using the Open AI Whisper API.

Setup

To run this loader you will need to create an account on the Open AI and obtain an auth key from the https://platform.openai.com/account page.

Usage

Once auth key is configured, you can use the loader to create transcriptions and then convert them into a Document.

import { OpenAIWhisperAudio } from "langchain/document_loaders/fs/openai_whisper_audio";

const filePath = "./src/document_loaders/example_data/test.mp3";

const loader = new OpenAIWhisperAudio(filePath);

const docs = await loader.load();

console.log(docs);

API Reference:


Help us out by providing feedback on this documentation page: