feat(examples): add Cartesia Sonic 3.5 and Ink demo#16839
Draft
31Carlton7 wants to merge 9 commits into
Draft
Conversation
Introduce @ai-sdk/cartesia with batch speech and transcription support, docs, examples, and model table updates following the ElevenLabs audio provider pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
…rlton/demo-cartesia-tts # Conflicts: # .changeset/bright-dolphins-speak.md # content/providers/01-ai-sdk-providers/95-cartesia.mdx
gr2m
added a commit
that referenced
this pull request
Jul 10, 2026
## Summary - Add the `@ai-sdk/cartesia` provider with Sonic 3.5 speech generation, Ink-Whisper batch transcription, and Ink 2 realtime transcription. - Map AI SDK speech and transcription options to the Cartesia 2026-03-01 API with validated formats, provider options, and structured errors. - Add browser-safe raw string/binary realtime transport, short-lived Cartesia STT token creation, automatic turn detection, manual finalization, normalized transcription events, documentation, package metadata, and a release changeset. Ink 2 uses Cartesia’s streaming WebSocket API; the batch `/stt` API remains correctly scoped to the Ink-Whisper family. ## Test plan - [x] Cartesia package Node and Edge tests (32 passing in each environment) - [x] Cartesia package type-check and build - [x] AI realtime browser transport tests (5 passing) and type-check - [x] Repository-wide format/lint and provider consistency checks - [ ] Live TTS/STT smoke test with a working `CARTESIA_API_KEY` using the stacked demo in #16839 --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Draft demo (not for merge) — a minimal, self-contained browser app to try Cartesia through
@ai-sdk/cartesia.sonic-3.5is the default.cartesia.transcription('ink-whisper').cartesia.experimental_realtime('ink-2')as the separate streaming transcription path implemented in feat(provider/cartesia): add Sonic 3.5 and Ink support #16815..env.exampledocuments the required local variables and.envremains git-ignored.Stacks on #16815 (
@ai-sdk/cartesiaprovider).Run locally
cd examples/cartesia-tts-demo cp .env.example .env pnpm startTest plan
Made with Cursor