feat(regen): add Flux TTS batch (REST) endpoint and agent latency report#744
Merged
Conversation
dg-coreylweathers
approved these changes
Jul 14, 2026
GregHolmes
added a commit
that referenced
this pull request
Jul 15, 2026
Release PR for **7.5.0** — [compare v7.4.0...v7.5.0](v7.4.0...v7.5.0) ## What's in 7.5.0 - **[#742](#742) — Flux TTS streaming (Speak V2) + agent listen reconfigure** - **Speak V2 streaming (WebSocket)** — `client.speak.v2.connect(...)`: new `speak/v2/` package (client, socket client, request/response types), top-level `SpeakV2Encoding` / `SpeakV2MipOptOut` / `SpeakV2Model` / `SpeakV2SampleRate` / `SpeakV2Tag`, and optional `send_flush()` / `send_close()` control messages. - **Agent mid-session listen reconfigure** — `send_update_listen(...)` with `AgentV1UpdateListen` / `AgentV1UpdateListenListen`, plus the `AgentV1ListenUpdated` server acknowledgement. - **Flux end-of-turn tuning** — new listen-provider fields `eot_threshold`, `eager_eot_threshold`, `eot_timeout_ms`. - **[#744](#744) — Flux TTS batch (REST) + agent latency report** - **Speak V2 batch (REST)** — `client.speak.v2.audio.generate(...)` (+ raw client): the REST companion to streaming. `model` required (flux-only); optional `encoding` / `container` / `sample_rate` / `bit_rate` / `callback` / `callback_method` / `tag` / `mip_opt_out` / `priority`. No `speed` (GA-only, excluded for EA). - `sample_rate` / `bit_rate` are typed as `int` — a float like `24000.0` is rejected on the wire. - Callback mode returns the `SpeakV2AcceptedResponse` JSON ack through the audio byte iterator as raw bytes; join the chunks and parse `request_id` yourself (documented in the docstring; typed content-type dispatch tracked as a follow-up). - **`AgentV1LatencyReport`** — new latency-report type + request, wired into the agent socket-client response union. - **Agent inject-message `interrupt`** — new value on `AgentV1InjectAgentMessageBehavior`. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Greg Holmes <greg.holmes@deepgram.com>
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.
feat(regen): Flux TTS batch (REST) + agent latency report
Regenerates the Python SDK against the latest Fern generator and API spec. Headline addition is the Flux TTS batch (REST) endpoint (
POST /v2/speak), the companion to the existing streaming (WebSocket)speak.v2.connect().What's new (generated surface)
client.speak.v2.audio.generate()(+ raw client),SpeakV2Response/SpeakV2AcceptedResponse(the callback ack),speak/v2/audio/**, andtests/wire/test_speak_v2_audio.py.modelrequired (flux-only), optionalencoding/container/sample_rate/bit_rate/callback/callback_method/tag/mip_opt_out/priority. Nospeed(GA-only, correctly excluded for EA).sample_rateandbit_rategenerate asint(see fix below).AgentV1LatencyReport: new agent type + request, wired into the agent socket client response union.interrupt: newinterruptvalue onAgentV1InjectAgentMessageBehavior(spec update).sample_rate/bit_ratecorrected to integerInitially generated as
float(spec usedtype: number, mirroring v1/Aura). stem types both asNonZeroU32; a float like24000.0is rejected on the wire. The docs spec was corrected totype: integer, the SDK re-generated, and patches re-reconciled. They now generate astyping.Optional[int].Patch reconciliation
Regen followed the freeze workflow (unfreeze frozen-and-patched files to
.bak-> Fern overwrites -> re-apply). All 27 manual patches were still needed; none dropped, every.fernignoreentry restored. Net diff vsmainis exactly the new surface above with all patches preserved verbatim.query_encoderbool coercion,client_wrapperrelease-please annotations, 5 socket clients (broad except, optional control-message params, agent_sanitize_numeric_types, listen/v2send_configureshim).agent_v1settings*(callable wrapper,messages->context,.messages),language_hint->language_hintsvalidators.__init__.pyre-exports and thecreate-keywire-alias test.Verification
mypy src/deepgram: success (856 files).pytest: 325 passed, 1 skipped.ruff check src/deepgram: clean. (Pre-existing import-sort errors in frozen hand-writtentests/manual/examplesare unchanged frommainand out of scope.)speak.v2.audio.generate()returns real audio for mp3 / linear16 / flac; integersample_rate(incl.44100) andbit_rateaccepted; a forced float"24000.0"is rejected by stem (expected a nonzero u32), confirming the integer typing is correct.Merge
Squash-merge (repo convention). The
feat(regen)title drives a release-please minor bump for the new endpoint.