Skip to content

feat(regen): add Flux TTS batch (REST) endpoint and agent latency report#744

Merged
dg-coreylweathers merged 8 commits into
mainfrom
gh/sdk-gen-2026-07-14
Jul 14, 2026
Merged

feat(regen): add Flux TTS batch (REST) endpoint and agent latency report#744
dg-coreylweathers merged 8 commits into
mainfrom
gh/sdk-gen-2026-07-14

Conversation

@GregHolmes

@GregHolmes GregHolmes commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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)

  • Flux TTS batch: client.speak.v2.audio.generate() (+ raw client), SpeakV2Response / SpeakV2AcceptedResponse (the callback ack), speak/v2/audio/**, and tests/wire/test_speak_v2_audio.py.
    • model required (flux-only), optional encoding / container / sample_rate / bit_rate / callback / callback_method / tag / mip_opt_out / priority. No speed (GA-only, correctly excluded for EA).
    • sample_rate and bit_rate generate as int (see fix below).
  • AgentV1LatencyReport: new agent type + request, wired into the agent socket client response union.
  • Agent inject-message interrupt: new interrupt value on AgentV1InjectAgentMessageBehavior (spec update).

sample_rate / bit_rate corrected to integer

Initially generated as float (spec used type: number, mirroring v1/Aura). stem types both as NonZeroU32; a float like 24000.0 is rejected on the wire. The docs spec was corrected to type: integer, the SDK re-generated, and patches re-reconciled. They now generate as typing.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 .fernignore entry restored. Net diff vs main is exactly the new surface above with all patches preserved verbatim.

  • Behavioral: query_encoder bool coercion, client_wrapper release-please annotations, 5 socket clients (broad except, optional control-message params, agent _sanitize_numeric_types, listen/v2 send_configure shim).
  • Schema back-compat: agent_v1settings* (callable wrapper, messages->context, .messages), language_hint->language_hints validators.
  • __init__.py re-exports and the create-key wire-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-written tests/manual / examples are unchanged from main and out of scope.)
  • Live against staging: speak.v2.audio.generate() returns real audio for mp3 / linear16 / flac; integer sample_rate (incl. 44100) and bit_rate accepted; 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.

@GregHolmes GregHolmes changed the title chore: SDK regeneration 2026-07-14 feat(regen): add Flux TTS batch (REST) endpoint and agent latency report Jul 14, 2026
@dg-coreylweathers dg-coreylweathers merged commit 6ca71c4 into main Jul 14, 2026
10 checks passed
@dg-coreylweathers dg-coreylweathers deleted the gh/sdk-gen-2026-07-14 branch July 14, 2026 14:53
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>
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.

2 participants