Blaze Livekit plugin integration - #5050
Conversation
4653f88 to
77090e4
Compare
|
Hi @tinalenguyen, This PR adds the Blaze provider integration for LiveKit Agents and keeps the implementation scoped under It follows the existing STT/TTS/LLM plugin structure used by other provider integrations. I’ve also addressed the outstanding review comments on the PR. Would appreciate a review when you have time. Thanks! |
|
hi @HoangPN711! thank you for the contribution, could you bump the version and add the plugin to this pyproject file |
|
Hi @tinalenguyen , thanks for reviewing this PR! Updated as requested: Bumped livekit-plugins-blaze to 1.5.9 (aligned with the current livekit-agents release) Please let me know if any further changes are needed. |
2b94037 to
e9052a6
Compare
1cea05c to
2c82c75
Compare
Devin: SpeechStream._run set closing_ws when the input channel drained but never closed the WebSocket, so async-for on recv hung until task cancel. After end_input, wait a short grace for trailing finals then close the WS so _run completes cleanly on intentional shutdown.
Devin: empty pcm path returned alternatives=[], while all other paths return one SpeechData — callers that index alternatives[0] crash. Return a single empty SpeechData (text="", confidence=0.0) for shape parity. Update unit test.
The gateway protocol (and agents-js) does not define a speech-start acknowledgement. Unconditional recv after speech-start either stalled until idle timeout (60s) when the server waits for a query, or dropped the first status/audio frame when pipelined. Let the normal reader loop handle whatever follows speech-start.
- Emit END_OF_SPEECH on SpeechStream teardown if speaking and no final arrived (grace close / peer drop left the user turn open). - Normalize api_url (config + STT/TTS/LLM constructors) so trailing slashes never produce //v1/... HTTP paths.
|
Hi @tinalenguyen — friendly re-review nudge when you have a moment. Status on
Happy to address any further feedback. Thanks! |
|
Hi @tinalenguyen — friendly re-review nudge when you have a moment. Status on
Happy to rebase or take any further feedback. Thanks! |
Keep main's plugin optional-deps pins at 1.6.10 and re-add blaze entry. Bump livekit-plugins-blaze to 1.6.10 to match workspace pins.
|
Automated fix: resolved merge conflicts with
Head: |
Prevent asyncio "exception was never retrieved" when the background reader already failed before finally cancel.
|
Follow-up for Devin review: consume pending TTS audio |
- Fall back to default when BLAZE_API_URL is empty/whitespace - Raise APIConnectionError(retryable=False) when auth token missing for STT stream (and TTS if same pattern)
- Regenerate uv.lock for livekit-plugins-blaze workspace member - Validate Blaze API/WS base URL has an absolute host - Avoid echoing raw auth handshake payloads/tokens in STT errors
|
Babysit fix for latest Devin findings: |
|
Fixed CI ruff format on Verified |
Match one-shot TTS: raise non-retryable APIConnectionError before opening the WS auth handshake with an empty token.
Route non-200 response text through existing redact helpers so bearer tokens echoed by gateways do not land in exception messages.
- Raise retryable error if audio reader finishes while text still pending - Route TTS WS error bodies through secret-redaction helpers
|
Hi @tinalenguyen — friendly re-review nudge when you have a moment. Status on
Happy to address any new feedback. Thanks! |
Summary
Add Blaze plugin support for LiveKit Agents.
Changes
Motivation
Enable Blaze voice AI services to be used through the existing LiveKit Agents plugin architecture.
Notes
The implementation is isolated under
livekit-plugins/livekit-plugins-blazeand follows the existing provider plugin pattern.