Skip to main content
@ai_kit/core includes model-agnostic audio transcription support, compatible with any OpenAI-compatible endpoint (Scaleway Whisper large v3, OpenAI whisper-1, etc.).

Four public primitives

createTranscriptionModel

Supports any OpenAI-compatible /audio/transcriptions endpoint (response_format=verbose_json).

transcribe

audio accepts a file path, an http(s) URL, or a Buffer / Uint8Array. The inputType is auto-detected when omitted.

Return value

createTranscriptionStreamingModel — streaming (native)

For long recordings you can stream the transcript as it is produced instead of waiting for the whole file. This primitive talks directly to the OpenAI-compatible /audio/transcriptions endpoint with stream=true and parses the server-sent events natively — it does not use the AI SDK’s experimental_transcribe.
Output starts streaming as soon as the provider has processed the first 30-second chunk — a few seconds in, rather than after the whole file.

Chunk shape

delta events carry incremental text; the single closing done event carries the full accumulated text (equal to the concatenation of all deltas). Pass an AbortSignal via abortSignal to cancel mid-stream.
Streaming uses the default JSON stream format — verbose_json (and therefore per-segment timestamps) is not available while streaming. Use transcribe / createTranscriptionModel when you need segments.

createTranscriptionTool — attach to an Agent

The tool schema exposed to the LLM: audio (path / URL / base64), inputType, language.

Supported audio formats

flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm (identical to OpenAI Whisper).