feat(soniox): add TTS speed support#2005
Open
rosetta-livekit-bot[bot] wants to merge 8 commits into
Open
Conversation
🦋 Changeset detectedLatest commit: 0d19988 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Reject non-finite speeds and release completed or failed streams so pooled connections and streaming inputs cannot leak. Co-authored-by: Cursor <cursoragent@cursor.com>
Release local waiters when callers cancel so nonresponsive servers cannot retain pooled stream state. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Keep provider-attempt cleanup from terminating consumer output before the base retry lifecycle completes. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep failed attempts owned until retry completion and drain cancellation before closing the pooled socket. Co-authored-by: Cursor <cursoragent@cursor.com>
Distinguish recoverable attempts from terminal failures so retries remain cancellable without retaining completed streams. Co-authored-by: Cursor <cursoragent@cursor.com>
Centralize provider cleanup after the base retry lifecycle so plugins do not duplicate private attempt policy. Co-authored-by: Cursor <cursoragent@cursor.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.
Summary
speedoption,[0.7, 1.3]validation range, runtime updates, and WebSocket request field.SynthesizeStreamcompletion hook so provider ownership spans the entire logical retry lifecycle.Source diff coverage
The source change from livekit/agents#6339 adds bounded Soniox TTS speed configuration. The JS port preserves its default, validation, update behavior, and initial WebSocket configuration field. JS-specific pooled WebSocket ownership and base-class retry behavior are covered by focused tests.
The Python implementation can pass through encoded formats. The JS TTS interface emits decoded
AudioFrames, so this port explicitly acceptspcm_s16leand rejects unsupported formats instead of silently decoding them incorrectly.Review fixes
TTS.close()cancels and settles them before pooled socket shutdown.Verification
Cue voice E2E
Verified at exact PR head
0d19988a469404d6ed2327bcecd70f0164871ab8in voice mode with a disclosed local protocol-compatible Soniox WebSocket boundary becauseSONIOX_API_KEYwas unavailable.sid_ec11dfb4a2b4.Please verify the Soniox speaking speed.AS_SPEAKING, the assistant conversation item, and return toAS_LISTENING/AS_IDLE; worker output independently reported playout completed without interruption.speed: 1.3, 24 kHzpcm_s16le, 48,000 PCM bytes, terminal response, and socket cleanup; SHA-2568b3e603753d90668c5890686a4fc550367eecfe243d4d709ae87d3a7afcb087f.04a15610aa43d6ee8ee7537c254e1d6ff60add2452b62bb464022dba2fe2b398.a477293786c1eba1ca0a90d8fb4740665f5faceb93971f71192e3882cbf100e0.events.jsonlSHA-256:aaaaf5aa43021a91888b04bdc0b36e3a7775c7abcf8223b8d09f813df091b871.result.jsonSHA-256:12ef54ef40dee1946473821ee5eecc4481916bc42ac101b23afa7f2d62997ad1.Ported from livekit/agents#6339