Skip to content

feat(assemblyai): add continuous_partials and interruption_delay stre…#5819

Open
dlange-aai wants to merge 5 commits into
livekit:mainfrom
dlange-aai:feat/assemblyai-plugin-add-new-params
Open

feat(assemblyai): add continuous_partials and interruption_delay stre…#5819
dlange-aai wants to merge 5 commits into
livekit:mainfrom
dlange-aai:feat/assemblyai-plugin-add-new-params

Conversation

@dlange-aai
Copy link
Copy Markdown
Contributor

@dlange-aai dlange-aai commented May 22, 2026

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 via update_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 ValueError is raised at construction if used with any other model.

Docs:

Test plan

  • Unit tests added in tests/test_plugin_assemblyai_stt.py covering default, set, model-guard, alias rewrite, and dynamic update (for continuous_partials)
  • make check passes (ruff format + lint + mypy strict)
  • uv run pytest tests/test_plugin_assemblyai_stt.py — 20/20 pass
  • Verified locally against the real AssemblyAI streaming endpoint: connection accepted with continuous_partials=true&interruption_delay=200, server returns Begin with
    model=u3-rt-pro

…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.
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

gsharp-aai and others added 4 commits May 22, 2026 16:19
…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
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