Skip to main content

Open AI Whisper Audio


Only available on Node.js.

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


To run this loader you will need to create an account on the Open AI and obtain an auth key from the page.


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

import { OpenAIWhisperAudio } from "@langchain/community/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();


API Reference:

Was this page helpful?

You can also leave detailed feedback on GitHub.