Skip to content

Blaze Livekit plugin integration - #5050

Open
HoangPN711 wants to merge 85 commits into
livekit:mainfrom
Actable-AI:feat/blaze-voicebot-plugin
Open

Blaze Livekit plugin integration#5050
HoangPN711 wants to merge 85 commits into
livekit:mainfrom
Actable-AI:feat/blaze-voicebot-plugin

Conversation

@HoangPN711

@HoangPN711 HoangPN711 commented Mar 9, 2026

Copy link
Copy Markdown

Summary

Add Blaze plugin support for LiveKit Agents.

Changes

  • add Blaze STT plugin
  • add Blaze TTS plugin
  • add Blaze LLM plugin
  • add Blaze plugin packaging/config helpers
  • add Blaze plugin README

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-blaze and follows the existing provider plugin pattern.

@CLAassistant

CLAassistant commented Mar 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@HoangPN711 HoangPN711 changed the title feat: add blaze voicebot plugin Blaze Livekit plugin integration Apr 3, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@HoangPN711
HoangPN711 force-pushed the feat/blaze-voicebot-plugin branch from 4653f88 to 77090e4 Compare April 18, 2026 15:06
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@HoangPN711

Copy link
Copy Markdown
Author

Hi @tinalenguyen,

This PR adds the Blaze provider integration for LiveKit Agents and keeps the implementation scoped under livekit-plugins/livekit-plugins-blaze.

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!

@tinalenguyen

Copy link
Copy Markdown
Member

hi @HoangPN711! thank you for the contribution, could you bump the version and add the plugin to this pyproject file

@HoangPN711

HoangPN711 commented May 13, 2026

Copy link
Copy Markdown
Author

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)
Added blaze = ["livekit-plugins-blaze>=1.5.9"] to livekit-agents/pyproject.toml

Please let me know if any further changes are needed.

@HoangPN711
HoangPN711 force-pushed the feat/blaze-voicebot-plugin branch 3 times, most recently from 2b94037 to e9052a6 Compare May 19, 2026 22:52
devin-ai-integration[bot]

This comment was marked as resolved.

@HoangPN711
HoangPN711 force-pushed the feat/blaze-voicebot-plugin branch 3 times, most recently from 1cea05c to 2c82c75 Compare June 11, 2026 22:13
devin-ai-integration[bot]

This comment was marked as resolved.

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-ai-integration[bot]

This comment was marked as resolved.

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.
devin-ai-integration[bot]

This comment was marked as resolved.

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.
devin-ai-integration[bot]

This comment was marked as resolved.

- 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.
devin-ai-integration[bot]

This comment was marked as resolved.

@trunghlt

Copy link
Copy Markdown

Hi @tinalenguyen — friendly re-review nudge when you have a moment.

Status on 6ae1f7da7:

  • CI green: ruff, unit-tests, type-check (3.10/3.13), blockguard, release gate, CLA
  • Devin Review SUCCESS (latest findings addressed; remaining E501 note is a false positive — E501 ignored project-wide and line is exactly 100 chars)
  • Prior review points from your 2026-07-24 pass remain addressed (blaze.vn URLs, authors, py.typed, PCM→WAV via rtc.AudioFrame.to_wav_bytes(), framework SentenceTokenizer, tests)
  • MERGEABLE; only blocked on review approval

Happy to address any further feedback. Thanks!

@trunghlt

Copy link
Copy Markdown

Hi @tinalenguyen — friendly re-review nudge when you have a moment.

Status on 6ae1f7da7:

  • CI green: ruff, unit-tests, type-check (3.10/3.13), blockguard, release gate, CLA
  • Devin Review SUCCESS (latest findings addressed; remaining E501 note is a false positive — E501 ignored project-wide and ruff is green)
  • Branch is MERGEABLE with main
  • Prior review feedback (README/blaze.vn, authors, py.typed, PCM→WAV, tokenizer) already addressed in earlier commits

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.
@trunghlt

Copy link
Copy Markdown

Automated fix: resolved merge conflicts with origin/main (1.6.10).

  • Kept main’s optional-deps pins at >=1.6.10 / browser >=0.2.10
  • Re-added blaze = ["livekit-plugins-blaze>=1.6.10"]
  • Bumped livekit-plugins-blaze to 1.6.10 to match workspace pins

Head: eb3f6b1af

devin-ai-integration[bot]

This comment was marked as resolved.

Prevent asyncio "exception was never retrieved" when the background
reader already failed before finally cancel.
@trunghlt

Copy link
Copy Markdown

Follow-up for Devin review: consume pending TTS audio reader_task exceptions after gracefully_cancel so asyncio does not later log "exception was never retrieved" when the reader already failed (e.g. ConnectionClosed). See be86781702ce1daa9a7eef2d68235388400fe21c.

devin-ai-integration[bot]

This comment was marked as resolved.

- 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)
devin-ai-integration[bot]

This comment was marked as resolved.

- 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
@trunghlt

Copy link
Copy Markdown

Babysit fix for latest Devin findings: a284fc0b493f5e745ba9cdce75ac4104c6ee2170 — URL host/scheme validation, STT/TTS error redaction, and uv.lock confirmation for livekit-plugins-blaze.

@trunghlt

Copy link
Copy Markdown

Fixed CI ruff format on livekit-plugins-blaze/.../_utils.py (collapsed multi-line ValueError to match ruff line-length formatting).

Verified uv.lock already lists livekit-plugins-blaze as a workspace member (uv lock is a no-op); prior commit message mentioned refreshing the lock but the package entry was already present from earlier workspace work.

devin-ai-integration[bot]

This comment was marked as resolved.

Match one-shot TTS: raise non-retryable APIConnectionError before
opening the WS auth handshake with an empty token.
devin-ai-integration[bot]

This comment was marked as resolved.

Route non-200 response text through existing redact helpers so
bearer tokens echoed by gateways do not land in exception messages.
devin-ai-integration[bot]

This comment was marked as resolved.

- Raise retryable error if audio reader finishes while text still pending
- Route TTS WS error bodies through secret-redaction helpers
@trunghlt

Copy link
Copy Markdown

Hi @tinalenguyen — friendly re-review nudge when you have a moment.

Status on d7f8622e1:

  • CI green: ruff, unit-tests, type-check (3.10/3.13), blockguard, release gate, CLA
  • Devin Review SUCCESS
  • Branch is MERGEABLE with main
  • Prior review feedback (README/blaze.vn, authors, py.typed, pcm→wav via AudioFrame.to_wav_bytes, TTS tokenizer) remains addressed

Happy to address any new feedback. Thanks!

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.

5 participants