Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(assemblyai): add streaming mode (latency/accuracy preset) param#6156

Merged
tinalenguyen merged 1 commit into
livekit:mainfrom
dlange-aai:feat/assemblyai-mode-param
Jun 18, 2026
Merged

feat(assemblyai): add streaming mode (latency/accuracy preset) param#6156
tinalenguyen merged 1 commit into
livekit:mainfrom
dlange-aai:feat/assemblyai-mode-param

Conversation

@dlange-aai

Copy link
Copy Markdown
Contributor

Summary

Adds a mode streaming parameter to the AssemblyAI STT plugin, exposing the u3-pro accuracy/latency preset:

  • min_latency β€” fastest time-to-text
  • balanced β€” the server default, recommended for voice agents
  • max_accuracy β€” highest accuracy, for scribes/post-call

mode is forwarded to the u3-pro ASR server, which applies its own per-mode tuning. Any silence / partials / VAD knobs set explicitly still take precedence over the mode's defaults.

Details

  • u3-rt-pro-family only (u3-rt-pro, u3-rt-pro-beta-1, universal-3-5-pro) β€” passing mode with any other model raises ValueError, consistent with the other u3-pro-gated params (prompt, voice_focus, etc.).
  • Connect-time only, not exposed via update_options. This mirrors the official AssemblyAI Python SDK, where mode lives on the connect-time StreamingParameters and is not part of UpdateConfiguration.
  • Sent as a connection query parameter; omitted entirely when unset so the server default applies.

Implementation follows the existing voice_focus param precedent (#6119).

Test plan

New tests in tests/test_plugin_assemblyai_stt.py:

  • default (unset)
  • accepts each of the three values
  • raises for non-u3-pro-family models
  • accepted for every u3-pro-family model
  • present in the connect config query when set / absent when unset
  • not exposed via update_options (connect-time only)

All 58 plugin tests pass; ruff format, ruff check, and mypy clean.

@dlange-aai dlange-aai requested a review from a team as a code owner June 18, 2026 15:59

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

Copy link
Copy Markdown
Contributor

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 bugs or issues to report.

Open in Devin Review

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