feat(assemblyai): add continuous_partials and interruption_delay stre…#5819
Open
dlange-aai wants to merge 5 commits into
Open
feat(assemblyai): add continuous_partials and interruption_delay stre…#5819dlange-aai wants to merge 5 commits into
dlange-aai wants to merge 5 commits into
Conversation
…aming options Expose Universal-3 Pro Streaming's continuous_partials (boolean) and interruption_delay (int ms) connection parameters. Both are restricted to the u3-rt-pro model. continuous_partials supports mid-session updates via update_options(); interruption_delay is constructor-only.
…tinuous_partials=true Three changes on top of the new u3-rt-pro streaming params: 1. Expose interruption_delay as a mid-stream update. The server's UpdateConfiguration model already accepts the field (input_messages.py:58) and forwards it to the running ASR (create_transforming_asr_message_worker.py:196), so wiring it through update_options gives parity with the existing continuous_partials path. 2. Default continuous_partials to True when model="u3-rt-pro" and no value is explicitly provided. This diverges from the AssemblyAI server default (False), since steady-cadence partials are typically desired in LiveKit turn-based agent pipelines. Comment in the code calls out the divergence. 3. Rewrite the continuous_partials docstring to describe the actual behavior in more detail (~3s cadence during long turns, first partial at 750ms unaffected, interaction with max_turn_silence and min_turn_silence). Tests updated: test_continuous_partials_update_from_default revised for the new LiveKit default. Three new tests: - test_continuous_partials_defaults_to_true_for_u3_rt_pro - test_continuous_partials_explicit_false_overrides_livekit_default - test_interruption_delay_update + test_interruption_delay_update_from_default All 24 tests pass; make check (format + lint + mypy) clean.
…uption-delay-mid-stream feat(assemblyai): mid-stream interruption_delay + LiveKit-default continuous_partials=true
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
Exposes two new Universal-3 Pro Streaming connection parameters on the AssemblyAI plugin:
continuous_partials(bool) — emit a steady stream of non-final partials approximately every 3 seconds while speech continues, regardless of silence. Useful for long, uninterrupted turns (e.g. a caller reading out a credit card number) where silence-based partials don't fire often enough. Supports mid-session toggling viaupdate_options().interruption_delay(int, ms, range 0–1000, default 500) — tunes how soon the first early partial is emitted, directly affecting time-to-first-token. Lower values give faster TTFT for barge-in / speculative inference; higher values produce more confident first partials. Constructor-only.Both parameters are u3-rt-pro–only; a
ValueErroris raised at construction if used with any other model.Docs:
Test plan
tests/test_plugin_assemblyai_stt.pycovering default, set, model-guard, alias rewrite, and dynamic update (forcontinuous_partials)make checkpasses (ruff format + lint + mypy strict)uv run pytest tests/test_plugin_assemblyai_stt.py— 20/20 passcontinuous_partials=true&interruption_delay=200, server returnsBeginwithmodel=u3-rt-pro