feat(waves): TTS helpers + x-expire-content (DevX, cuts 5.5.0) - #88
Merged
Conversation
DevX: the client exposes several synthesize_* TTS methods with no obvious starting point. Add two convenience wrappers over synthesize_tts for the common case — write speech to a file, or get the audio bytes — with sensible defaults (lightning_v3.1, wav) and **kwargs passthrough. Additive; nothing changed on the generated client. Live-verified + mock unit tests. No version bump (DevX pass).
- Add expire_content=True to the TTS helpers to send the Enterprise x-expire-content header, and synthesize_with_expiry() to also read the x-content-expiry response outcome (via with_raw_response). Non-Enterprise requests still succeed; the opt-in is ignored and the outcome reports it. - Bump to 5.5.0 with a changelog covering the DevX pass (PlanNotEntitledError + actionable error messages, TTS helpers, content-expiry).
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.
DevX pass — TTS start-here ergonomics
client.wavesexposes 7synthesize_*methods with no obvious "start here." Add two convenience wrappers oversynthesize_ttsfor the common case:Sensible defaults (
lightning_v3.1,wav),**kwargspassthrough (sample_rate,speed,language, …). Sync client. Additive — nothing on the generated client changed; new functions in the existingwaves/helpers/package (alongsidestream_speech_to_text).Verification
Live:
synthesize_to_filewrote 127KB wav,synthesize_bytesreturned 84KB. Mock unit tests assert chunk-join, file write + byte count, and kwargs/defaults forwarding. mypy-clean.No version bump — part of the DevX pass (with #87). Will cut one 5.5.0 when the pass lands.
🤖 Generated with Claude Code