Summary
The Vercel AI SDK (ai package) exports experimental_generateSpeech (text-to-speech) and experimental_transcribe (speech-to-text) as core functions. Neither the wrapper (wrapAISDK) nor the auto-instrumentation plugin instruments them. Calls to these functions produce no Braintrust spans.
Every other AI SDK core execution function — generateText, streamText, generateObject, streamObject, embed, embedMany, rerank, and the Agent class methods — is fully instrumented, making these the only uninstrumented generative execution functions in the AI SDK plugin.
What instrumentation is missing
- Auto-instrumentation config (
js/src/auto-instrumentations/configs/ai-sdk.ts): No config entries for experimental_generateSpeech or experimental_transcribe. Configs exist for 13 other AI SDK functions.
- Channels (
js/src/instrumentation/plugins/ai-sdk-channels.ts): No channel definitions for speech generation or transcription. 14 channels are defined for other functions.
- Plugin (
js/src/instrumentation/plugins/ai-sdk-plugin.ts): No handler for speech or transcription calls.
- Vendor types (
js/src/vendor-sdk-types/ai-sdk-common.ts): AISDKNamespaceBase does not include experimental_generateSpeech or experimental_transcribe.
A grep for generateSpeech or transcribe across js/src/ returns zero matches.
Upstream reference
Both functions are documented core exports of the ai package (v6+):
| Function |
Description |
Reference |
experimental_generateSpeech |
Converts text to speech audio using a SpeechModelV3. Accepts model, text, voice, outputFormat, instructions, speed, language. Returns generated audio as base64/Uint8Array with media type. |
https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-speech |
experimental_transcribe |
Generates a text transcript from audio input using a TranscriptionModelV3. Accepts model, audio (string/Uint8Array/ArrayBuffer/URL). Returns transcript text, segments with timing, detected language, and duration. |
https://ai-sdk.dev/docs/reference/ai-sdk-core/transcribe |
Both are imported from 'ai' (the same package instrumented by this repo) and are available in AI SDK v6, which is already instrumented for other functions (ToolLoopAgent.generate, ToolLoopAgent.stream).
Note: Both carry the experimental_ prefix, indicating the API surface may evolve. However, they are documented, functional, and available in the same SDK version that this repo already instruments for other v6-only features.
Braintrust docs status
not_found — The Braintrust AI SDK integration docs do not enumerate specific supported functions. generateSpeech and transcribe are not mentioned.
Precedent in this repo
Local files inspected
js/src/auto-instrumentations/configs/ai-sdk.ts — no speech/transcribe configs
js/src/instrumentation/plugins/ai-sdk-channels.ts — no speech/transcribe channels
js/src/instrumentation/plugins/ai-sdk-plugin.ts — no speech/transcribe handlers
js/src/vendor-sdk-types/ai-sdk-common.ts — no speech/transcribe types
js/src/wrappers/ai-sdk/ai-sdk.ts — no speech/transcribe wrapping
e2e/scenarios/ai-sdk-instrumentation/ — no speech/transcribe test scenarios
Summary
The Vercel AI SDK (
aipackage) exportsexperimental_generateSpeech(text-to-speech) andexperimental_transcribe(speech-to-text) as core functions. Neither the wrapper (wrapAISDK) nor the auto-instrumentation plugin instruments them. Calls to these functions produce no Braintrust spans.Every other AI SDK core execution function —
generateText,streamText,generateObject,streamObject,embed,embedMany,rerank, and the Agent class methods — is fully instrumented, making these the only uninstrumented generative execution functions in the AI SDK plugin.What instrumentation is missing
js/src/auto-instrumentations/configs/ai-sdk.ts): No config entries forexperimental_generateSpeechorexperimental_transcribe. Configs exist for 13 other AI SDK functions.js/src/instrumentation/plugins/ai-sdk-channels.ts): No channel definitions for speech generation or transcription. 14 channels are defined for other functions.js/src/instrumentation/plugins/ai-sdk-plugin.ts): No handler for speech or transcription calls.js/src/vendor-sdk-types/ai-sdk-common.ts):AISDKNamespaceBasedoes not includeexperimental_generateSpeechorexperimental_transcribe.A grep for
generateSpeechortranscribeacrossjs/src/returns zero matches.Upstream reference
Both functions are documented core exports of the
aipackage (v6+):experimental_generateSpeechSpeechModelV3. Acceptsmodel,text,voice,outputFormat,instructions,speed,language. Returns generated audio as base64/Uint8Array with media type.experimental_transcribeTranscriptionModelV3. Acceptsmodel,audio(string/Uint8Array/ArrayBuffer/URL). Returns transcript text, segments with timing, detected language, and duration.Both are imported from
'ai'(the same package instrumented by this repo) and are available in AI SDK v6, which is already instrumented for other functions (ToolLoopAgent.generate,ToolLoopAgent.stream).Note: Both carry the
experimental_prefix, indicating the API surface may evolve. However, they are documented, functional, and available in the same SDK version that this repo already instruments for other v6-only features.Braintrust docs status
not_found— The Braintrust AI SDK integration docs do not enumerate specific supported functions.generateSpeechandtranscribeare not mentioned.Precedent in this repo
generateImageis tracked as a separate gap in Vercel AI SDKgenerateImagenot instrumented (wrapper and auto-instrumentation) #1626.audio.speech.create,audio.transcriptions.create) are tracked in OpenAIaudio.transcriptions.create()andaudio.speech.create()not instrumented (wrapper and auto-instrumentation) #1629.audio.speechandaudio.transcriptions) not instrumented #1749.groqaudio APIs #1864.Local files inspected
js/src/auto-instrumentations/configs/ai-sdk.ts— no speech/transcribe configsjs/src/instrumentation/plugins/ai-sdk-channels.ts— no speech/transcribe channelsjs/src/instrumentation/plugins/ai-sdk-plugin.ts— no speech/transcribe handlersjs/src/vendor-sdk-types/ai-sdk-common.ts— no speech/transcribe typesjs/src/wrappers/ai-sdk/ai-sdk.ts— no speech/transcribe wrappinge2e/scenarios/ai-sdk-instrumentation/— no speech/transcribe test scenarios