File: transcribe.md | Updated: 11/15/2025
Menu
v5 (Latest)
AI SDK 5.x
Model Context Protocol (MCP) Tools
Experimental_StdioMCPTransport
Copy markdown
======================================================================================
transcribe is an experimental feature.
Generates a transcript from an audio file.
import { experimental_transcribe as transcribe } from 'ai';import { openai } from '@ai-sdk/openai';import { readFile } from 'fs/promises';
const { text: transcript } = await transcribe({ model: openai.transcription('whisper-1'), audio: await readFile('audio.mp3'),});
console.log(transcript);
import { experimental_transcribe as transcribe } from "ai"
TranscriptionModelV2
The transcription model to use.
DataContent (string | Uint8Array | ArrayBuffer | Buffer) | URL
The audio file to generate the transcript from.
Record<string, Record<string, JSONValue>>
Additional provider-specific options.
number
Maximum number of retries. Default: 2.
AbortSignal
An optional abort signal to cancel the call.
Record<string, string>
Additional HTTP headers for the request.
string
The complete transcribed text from the audio input.
Array<{ text: string; startSecond: number; endSecond: number }>
An array of transcript segments, each containing a portion of the transcribed text along with its start and end times in seconds.
string | undefined
The language of the transcript in ISO-639-1 format e.g. "en" for English.
number | undefined
The duration of the transcript in seconds.
TranscriptionWarning[]
Warnings from the model provider (e.g. unsupported settings).
Array<TranscriptionModelResponseMetadata>
Response metadata from the provider. There may be multiple responses if we made multiple calls to the model.
TranscriptionModelResponseMetadata
Date
Timestamp for the start of the generated response.
string
The ID of the response model that was used to generate the response.
Record<string, string>
Response headers.
On this page
Deploy and Scale AI Apps with Vercel.
Vercel delivers the infrastructure and developer experience you need to ship reliable AI-powered applications at scale.
Trusted by industry leaders: