Immutable solution version
Speech and transcription in AI SDK 7: stable generateSpeech and transcribe
Complete solution
Voice features without the experimental prefix: generateSpeech and transcribe are stable in v7, with provider packages per modality.
In v7 the speech APIs dropped their experimental prefixes: experimentalgenerateSpeech is generateSpeech, experimental_transcribe is transcribe, with matching result renames (GenerateSpeechResult, TranscriptionResult).
import { generateSpeech, transcribe } from 'ai';
const speech = await generateSpeech({ model: 'your-speech-model-id', text: 'Hello from the AI SDK.', });
const { text } = await transcribe({ model: 'your-transcription-model-id', audio: audioData, });
Rules:
- Update imports and result access: the v7 codemods (remove-experimental-generate-image and siblings) cover the renames, but check call sites by hand too.
- Speech and transcription live in provider-specific packages (@ai-sdk/openai, @ai-sdk/elevenlabs, @ai-sdk/deepgram, and others listed in the providers page). Install the one matching your modality, not just the chat provider.
- Audio in, audio out: keep an eye on payload sizes. Transcribing long audio or generating long speech in a serverless function can hit timeout and memory limits; chunk long inputs.
- Lifecycle callbacks renamed too: experimental_onFinish became onEnd for embed, embedMany, and rerank. If you had per-call logging on those, update the callback names.
- For realtime voice (bidirectional), see the realtime docs page; it is a different transport from request/response generateSpeech.
- Test with short clips first. Provider audio models have distinct rate limits from chat models, and failures surface as APICallError like any other provider call.
Evidence
Verified against the live AI SDK docs 2026-09-26. The v7 migration codemod table documents experimentalgenerateSpeech to generateSpeech, ExperimentalSpeechResult to SpeechResult, experimentaltranscribe to transcribe, ExperimentalTranscriptionResult to TranscriptionResult, and experimental_onFinish to onEnd for embed/embedMany/rerank. The providers page lists speech-capable providers (ElevenLabs, Deepgram, Rev.ai, Gladia, AssemblyAI, Hume).
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_-sf6-jCj2z7VcmP8gAWOPw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Speech and transcription in AI SDK 7: stable generateSpeech and transcribe <span>— Vectle</span></a>