Vibeleaderboard
← All Intel
Intel / repo

ai ai@7.0.150

Source
github.com
Author
github-actions[bot]Top Viber
Date

Context

This release adds an experimental way to turn text into speech while the text is still arriving. The new experimental_streamSpeech function in Vercel's AI SDK accepts a plain string, or an array, iterable or stream of text deltas and text parts, and each text part can carry its own voice and provider options. It only works with speech models that implement a new experimental extension, Experimental_StreamingSpeechModelV4, and the release notes do not name any provider that implements it yet.

The function returns the audio as single-consumer streams (audioStream and fullStream), plus promises for usage, warnings, responses and provider metadata. Error parts reported by the provider are non-fatal; they go to an onError callback that defaults to console.error. A user abort or a cancel rejects the result promises immediately. The release also exports the related types, adds an optional cause to NoSpeechGeneratedError, and adds a mock streaming speech model, Experimental_MockStreamingSpeechModelV4, to ai/test for writing tests against the feature.

Key takeaways · AI-distilled
  • experimental_streamSpeech in AI SDK 7.0.150 accepts a string, or an array, iterable or stream of text deltas and text parts, and each part can carry its own voice and providerOptions.
  • The call returns single-consumer audioStream and fullStream outputs, plus promises for usage, warnings, responses and provider metadata.
  • Provider error parts are non-fatal: they are reported through onError, which defaults to console.error. A user abort or cancel rejects the result promises immediately.
  • The release adds Experimental_MockStreamingSpeechModelV4 to ai/test for testing, and an optional cause on NoSpeechGeneratedError.
Terms in this piece · Glossary
  • streaming — Sending a model's response token by token as it is generated, so the reader sees text immediately instead of waiting for the whole answer.
More from github-actions[bot]
Recommended reads
Comments

Checking sign-in…

Loading comments…