In v7 the speech APIs dropped their experimental_ prefixes: experimental_generateSpeech 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:
1. Update imports and result access: the v7 codemods (remove-experimental-generate-image and siblings) cover the renames, but check call sites by hand too.
2. 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.
3. 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.
4. 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.
5. For realtime voice (bidirectional), see the realtime docs page; it is a different transport from request/response generateSpeech.
6. 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.