Vercel AI SDK has updated its Deepgram integration to version 3.1.0, addressing several features related to transcription and speech generation. This release includes fixes for how transcription options are handled and refines the composition of speech voice and language settings.
Key Points
- The @ai-sdk/deepgram@3.1.0 release includes fixes for transcription options and speech voice/language composition.
- Transcription options such as
keyterm,paragraphs,intents,sentiment, andreplaceare now correctly sent as query parameters in/v1/listenrequests. - The provider's callable signature for transcription has been widened to accept any transcription model ID, moving beyond the previous
'nova-3'limitation. - Speaker diarization (
diarize) no longer defaults totruein pre-recorded requests; it is now only sent when explicitly set inproviderOptions.deepgram. - Bare voice family IDs (e.g.,
aura-2,aura) now compose the upstream model ID fromgenerateSpeechvoice and language options, withlanguagedefaulting toen. - Full voice IDs (e.g.,
aura-2-helena-en) continue to pass through unchanged. - The
DeepgramSpeechModelIdunion has been trimmed to family IDs plus string types.
Context
According to the Vercel AI SDK Changelog, the @ai-sdk/deepgram@3.1.0 update specifically addresses issues where certain transcription parameters were silently dropped from requests. The change in diarization default behavior is noted as a response to speaker diarization being a paid Deepgram add-on, preventing unintended charges for users who did not explicitly request it. The update also enhances the flexibility of speech generation by allowing broader model ID support and more precise voice composition.
Why It Matters
This update provides developers using the Vercel AI SDK with more control and accuracy when integrating Deepgram's transcription and speech synthesis capabilities. The changes ensure that specified transcription options are correctly applied and that speaker diarization costs are only incurred when explicitly desired, potentially impacting application design and operational expenses.
What To Do
- Review your existing Deepgram integration code if you rely on speaker diarization for pre-recorded requests.
- Explicitly pass
providerOptions: { deepgram: { diarize: true } }if your application requires speaker diarization. - Note the expanded support for transcription model IDs and adjust your model selection if you use models other than
'nova-3'. - Test speech generation with bare voice family IDs to ensure correct composition with language options.
