Skip to content

Bump cookbook recipes to SDK 4.x + migrate the 4.x breaking changes - #6

Merged
1 commit merged into
mainfrom
lukeoliff/drg-475-cookbook-bump-sdk-pins-to-latest-speechifyapi-4x-speechify
Sep 8, 2026
Merged

1 commit merged into
mainfrom
lukeoliff/drg-475-cookbook-bump-sdk-pins-to-latest-speechifyapi-4x-speechify

Conversation

@ghost

@ghost ghost commented Sep 8, 2026

Copy link
Copy Markdown

Moves every SDK recipe to the latest published SDK — @speechify/api 4.0.1 (via the pnpm catalog) and speechify-api 4.0.0 (Python pyproject floors + refreshed uv locks) — and fixes the two API-surface changes the 3→4 major bump introduced. Found by an SDK-example audit; the surface was otherwise correct, but the major bump broke two recipes at compile time.

Breaking changes migrated

  • streaming (TS)audio.stream(...) now takes the request under body: { input, voice_id, model } (was flat). Python stream(...) stays flat and is unchanged.
  • voice cloning (TS + Python) — the consent JSON field (fullName + email) is gone, replaced by verified consent: create a consent challenge, have the speaker read the returned phrase, and send consent_challenge_id + consent_recording. Both recipes now:
    • create/reuse a single-use challenge (cached in .consent-challenge.json between runs),
    • are bring-your-own-audio — the consent recording must be the same speaker as the sample, so no shippable sample carries valid consent; the bundled NASA sample is removed,
    • print the phrase and the files to provide, then clone on the second run.

Unchanged on 4.x

speech recipes (quickstart, speech-marks, ssml-emotion) and Python streaming — verified by typecheck (TS) and by checking the consent surface against the installed 4.0.0 (Python).

Verified

  • pnpm typecheck passes across all TS recipes on 4.0.1.
  • All Python recipes compile; uv locks resolve speechify-api 4.0.0; the consent-challenge surface exists on the installed package.

Not included (flagged separately)

The native (raw-HTTP) voice-cloning recipes — TS, Python, Bash — still send the deprecated consent form field. They work today but need migrating to the consent-challenge flow + Speechify-Version: 2026-09-13. Different axis (REST API deprecation, not SDK version) — tracked as a follow-up.

DRG-475

Move every SDK recipe to the latest published SDK (@speechify/api 4.0.1,
speechify-api 4.0.0) via the pnpm catalog and the Python pyproject floors,
and fix the two API-surface changes the major bump introduced:

- streaming (TS): audio.stream now takes the request under `body`
- voice cloning (TS + Py): the `consent` JSON field is replaced by verified
  consent — create a consent challenge, have the speaker read the returned
  phrase, and send consent_challenge_id + consent_recording. Recipes now cache
  the single-use challenge between runs and are bring-your-own-audio (the
  consent recording must be the same speaker as the sample), so the bundled
  sample is removed.

Python streaming and the speech recipes are unchanged on 4.x. Lockfiles
refreshed; TS typechecks, Python recipes compile and the consent surface is
verified against the installed 4.0.0.
@ghost
ghost marked this pull request as ready for review September 8, 2026 13:54
@ghost
ghost merged commit 65650c3 into main Sep 8, 2026
12 of 13 checks passed
ghost pushed a commit that referenced this pull request Sep 8, 2026
Adds runnable recipes for API surfaces the cookbook didn't cover yet, each in
every applicable lane (TypeScript SDK/native, Python SDK/native, Bash):

- list-models, list-voices, voice-language-model-support
- version-pinning-and-idempotency, error-handling
- multilingual (language param + simba-3.0), output-formats (telephony/bitrate)
- watermark detect/verify (REST-only — not in the SDKs)

Update the README index and COVERAGE matrix; ignore pcm/ulaw artifacts and agent
worktrees. Also reformats five voice-cloning files that had drifted from Prettier
on main, so format:check stays green.

The v4 SDK bump and verified-consent voice cloning already landed (#6, #7); this
builds on them. Verified end-to-end against the live API on every lane.
This pull request was closed.
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.

0 participants