feat(regen): Speak V2 TTS websocket, agent update-listen, Flux EOT tuning#742
Open
GregHolmes wants to merge 6 commits into
Open
feat(regen): Speak V2 TTS websocket, agent update-listen, Flux EOT tuning#742GregHolmes wants to merge 6 commits into
GregHolmes wants to merge 6 commits into
Conversation
…nce.md Apply the socket-client patch convention to the newly generated speak/v2/socket_client.py so it is consistent with the other four clients: broad `except Exception` (custom-transport error contract) and optional `send_flush()`/`send_close()` for no-payload control messages. Freeze it in .fernignore and add regression coverage. Document the new Speak V2 WebSocket in reference.md and add send_update_listen to the Agent V1 send-methods section.
…fields Cover the functionality introduced by the 2026-07-08 regen that shipped with only indirect coverage: - tests/custom/test_speak_v2_socket.py: Speak V2 send serialization, response-type parsing, and broad-except error-emit behavior. - tests/custom/test_eot_thresholds_feature.py: eot_threshold / eager_eot_threshold / eot_timeout_ms serialize on the three listen providers (mirrors test_language_hints_feature.py). - tests/custom/test_agent_update_listen.py: send_update_listen serialization + AgentV1ListenUpdated response resolution. - tests/manual/speak/v2/connect/: standalone connect scripts (main, async, with_auth_token, with_raw_response), parity with speak/v1. - examples/25-text-to-speech-streaming-v2.py: Speak V2 streaming example. Freeze the three new custom tests in .fernignore.
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
Fern SDK regeneration (2026-07-08). Pulls in new generator output, re-applies the hand-maintained patches, extends the socket-client convention to the new client, and adds test + example coverage for the new surface.
New public surface (Fern-generated this regen)
client.speak.v2.connect(...)): newspeak/v2/package (client, socket client, request/response types) plus top-levelSpeakV2Encoding/MipOptOut/Model/SampleRate/Tag.send_update_listen(...)withAgentV1UpdateListen/AgentV1UpdateListenListen, and theAgentV1ListenUpdatedserver acknowledgement.eot_threshold,eager_eot_threshold,eot_timeout_ms.Manual-patch reconciliation
The generator caught up on none of the existing back-compat concerns, so all 25 frozen patches were re-applied (nothing dropped from
.fernignore), preserving the new generator additions:__init__.pyfiles (kept alongside the newSpeakV2*/AgentV1*entries).language_hint→language_hintsmigration shim re-added to the three listen-provider models (kept alongside the neweot_*fields)._sanitize_numeric_types, broadexcept Exception, optionalsend_keep_alive(kept the newsend_update_listen).query_encoderbool coercion,agent_v1settings*back-compat, create-key alias + wire test — all restored.Judgment call — listen/v2
send_configureshim: keptThe generator now emits complete
ListenV2Configure/ListenV2ConfigureSuccessmodels, but adopting them changes the public signature (raw dict → model, typed responses) — a breaking change. Thetyping.Anyshim is kept for this maintenance regen; typed-model adoption is deferred to a future major/minor.New: Speak V2 socket-client patch
The newly generated
speak/v2/socket_client.pywas made consistent with the other four socket clients and frozen:except Exception(preserves the custom-transport error contract — a transport can raise arbitrary types; the narrow generated catch would leak them past the message loop).send_flush()/send_close()for no-payload control messages (parity withspeak/v1).Test & example coverage
tests/custom/test_speak_v2_socket.py— send serialization, response-type parsing, broad-except error emission.tests/custom/test_eot_thresholds_feature.py—eot_*fields serialize on all three listen providers.tests/custom/test_agent_update_listen.py—send_update_listenserialization +AgentV1ListenUpdatedresolution.tests/manual/speak/v2/connect/— standalone scripts (main / async / with_auth_token / with_raw_response), parity withspeak/v1.examples/25-text-to-speech-streaming-v2.py(+examples/README.mdentry).reference.md— new "Speak V2 Connect" section andsend_update_listenadded to the Agent V1 send methods.Verification
mypy src/— clean (844 files)mypy tests/typecheck— cleanpytest— 318 passed, 1 skippedruff check src— clean (new test/example/manual files add no new warnings)Known limitation
Live end-to-end testing of Speak V2 is deferred:
/v2/speak(Flux) currently returns HTTP 400 at the handshake, consistent with the endpoint not yet being publicly available / enabled. The SDK builds the correct, spec-conformant request (verified), and the unit tests validate client behavior without the live endpoint. The manual scripts are ready for the live check once Flux is enabled.