Skip to content

Migrate native voice-cloning recipes to the verified-consent flow - #7

Merged
2 commits merged into
mainfrom
lukeoliff/drg-480-cookbook-native-voice-cloning-consent-flow
Sep 8, 2026
Merged

2 commits merged into
mainfrom
lukeoliff/drg-480-cookbook-native-voice-cloning-consent-flow

Conversation

@ghost

@ghost ghost commented Sep 8, 2026

Copy link
Copy Markdown

The SDK voice-cloning recipes moved to verified consent for SDK 4.x (PR #6). The native (raw-HTTP) recipes still POSTed the deprecated consent form field (fullName + email) — they work today but are deprecated and will be switched off. This migrates all three to the consent-challenge flow.

Changes (TypeScript fetch, Python requests, Bash curl)

  • POST /v1/voices/consent-challenges (JSON { full_name }) → returns the phrase + id; cached single-use in .consent-challenge.json between runs.
  • POST /v1/voices multipart now sends consent_challenge_id + consent_recording (was consent).
  • All calls pin Speechify-Version: 2026-09-13 (the version the flow ships on).
  • 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; recipes print the phrase and the files to provide, then clone on the second run.

Mirrors the SDK recipes in #6 so the native and SDK paths teach the same flow.

Verified

  • TS typechecks; Bash passes shellcheck + bash -n; Python compiles.
  • REST shapes (endpoint, JSON body, multipart field names, version header) taken from the generated SDK's own request code.

DRG-480

Luke Oliff added 2 commits September 8, 2026 12:16
The SDK voice-cloning recipes moved to verified consent for SDK 4.x; the native
(raw-HTTP) recipes still POSTed the deprecated `consent` form field. Migrate all
three — TypeScript (fetch), Python (requests), Bash (curl) — to the consent-
challenge flow and pin `Speechify-Version: 2026-09-13`:

- POST /v1/voices/consent-challenges to get the phrase (cached single-use between
  runs in .consent-challenge.json),
- POST /v1/voices multipart with consent_challenge_id + consent_recording,
- bring-your-own-audio (the recording must be the same speaker as the sample), so
  the bundled NASA sample is removed.

TS typechecks; Bash passes shellcheck + bash -n; Python compiles.
@ghost
ghost marked this pull request as ready for review September 8, 2026 13:54
@ghost
ghost merged commit 5007ea9 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