Menu

AI Gateway now supports streaming transcription - Vercel
📰

AI Gateway now supports streaming transcription - Vercel

Vercel News·Kevin Dawkins·5 days ago
#0CaAmCc0
Reading 0:00
15s threshold

AI Gateway now supports streaming transcription . Previously, transcription required a complete audio file and returned the full transcript in a single response. Now you can stream audio in as it's captured and get transcript updates back as the model produces them, keeping latency low for uses like live captioning and voice input.

Streaming transcription is in beta and available through the AI SDK 's streamTranscribe function with any streaming-capable transcription model.

The example below streams raw PCM audio to openai/gpt-realtime-whisper and prints each transcript delta as it arrives. The result stream also carries partial and final transcripts:

import { experimental_streamTranscribe as streamTranscribe } from 'ai' ;

const result = streamTranscribe ( {

model : 'openai/gpt-realtime-whisper' ,

audio : audioStream , // ReadableStream<Uint8Array | string>

inputAudioFormat : { type : 'audio/pcm' , rate : 24000 } ,

} ) ;

for await ( const part of result . fullStream ) {

if ( part .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.