-
Notifications
You must be signed in to change notification settings - Fork 2.7k
AssemblyAI added EU streaming endpoint option #4571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughAdds a Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant STT
participant SpeechStream
participant AssemblyAI_WS
Client->>STT: request stream(start)
STT->>SpeechStream: create stream(..., base_url)
SpeechStream->>AssemblyAI_WS: open WebSocket at base_url
SpeechStream->>AssemblyAI_WS: send audio frames
AssemblyAI_WS-->>SpeechStream: deliver transcription events
SpeechStream-->>STT: forward transcriptions
STT-->>Client: emit transcription results
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧬 Code graph analysis (1)livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
✏️ Tip: You can disable this entire section by setting Comment |
longcw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me! something nit
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
Outdated
Show resolved
Hide resolved
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In
`@livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py`:
- Around line 80-86: The docstring for the parameter endpoint_url is incomplete;
update the parameter description (in the function/method docstring that includes
endpoint_url) to explicitly state the default endpoint, e.g. "Defaults to the US
endpoint (wss://streaming.assemblyai.com/v3/ws)." Ensure the sentence replaces
the dangling "Defaults to US" phrase and clearly names the default URL.
- Around line 359-365: The URL building currently concatenates
self._endpoint_url and a new query string which breaks if self._endpoint_url
already contains query params; instead parse self._endpoint_url (using
urllib.parse.urlparse), merge its existing query params (urllib.parse.parse_qs)
with the filtered_config dict (ensuring boolean -> "true"/"false" conversion
already in filtered_config), flatten/encode the combined params with
urllib.parse.urlencode(doseq=True), reconstruct the full URL with
urllib.parse.urlunparse, and then call await self._session.ws_connect(url,
headers=headers); update the logic around filtered_config, self._endpoint_url,
urlencode, and the ws_connect call to use the merged-safe URL.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings
Files:
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: type-check (3.9)
- GitHub Check: unit-tests
- GitHub Check: type-check (3.13)
🔇 Additional comments (2)
livekit-plugins/livekit-plugins-assemblyai/livekit/plugins/assemblyai/stt.py (2)
95-156: Endpoint URL is correctly threaded into new streams.This cleanly ensures all streams use the configured endpoint.
200-208: SpeechStream stores endpoint URL cleanly.No concerns with the propagation pattern here.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.