Skip to content

feat(examples): add Cartesia Sonic 3.5 and Ink demo#16839

Draft
31Carlton7 wants to merge 9 commits into
mainfrom
carlton/demo-cartesia-tts
Draft

feat(examples): add Cartesia Sonic 3.5 and Ink demo#16839
31Carlton7 wants to merge 9 commits into
mainfrom
carlton/demo-cartesia-tts

Conversation

@31Carlton7

@31Carlton7 31Carlton7 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Draft demo (not for merge) — a minimal, self-contained browser app to try Cartesia through @ai-sdk/cartesia.

  • Type text → choose a Sonic model and voice ID → generate and play audio; sonic-3.5 is the default.
  • Push-to-talk → record from the mic and batch-transcribe with cartesia.transcription('ink-whisper').
  • Calls out cartesia.experimental_realtime('ink-2') as the separate streaming transcription path implemented in feat(provider/cartesia): add Sonic 3.5 and Ink support #16815.
  • No secrets committed; .env.example documents the required local variables and .env remains git-ignored.

Stacks on #16815 (@ai-sdk/cartesia provider).

Run locally

cd examples/cartesia-tts-demo
cp .env.example .env
pnpm start

Test plan

  • Provider and AI package prestart build succeeds
  • Local server boots and serves the Sonic 3.5 / Ink demo UI
  • Live TTS and STT requests with a working Cartesia API key

Made with Cursor

31Carlton7 and others added 2 commits July 6, 2026 15:24
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>
@31Carlton7 31Carlton7 changed the title feat(examples): add Cartesia text-to-speech demo feat(examples): add Cartesia Sonic 3.5 and Ink demo Jul 8, 2026
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>
Base automatically changed from carlton/cartesia-ai-sdk to main July 10, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant