Skip to content

Blaze Livekit plugin integration#5050

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

Blaze Livekit plugin integration#5050
HoangPN711 wants to merge 57 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
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ HoangPN711
✅ fpt-hoangpn2
❌ trunghlt
You have signed the CLA already but the status is still pending? Let us recheck it.

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
fpt-hoangpn2 and others added 22 commits July 24, 2026 13:32
- Rebase onto main; keep optional-deps at 1.6.6 and add blaze extra
- Bump livekit-plugins-blaze to 1.6.6 to match monorepo
- Fix ruff I001 import order in test_plugin_blaze_utils.py
- Remove explicit output_emitter.flush() at end of streaming TTS _run
  so base end_input() can set is_final on the last audio frame
- TTS default model: 2.0-realtime (required by /v1/tts/realtime aliases)
- STT batch model: stt-async-1.5 on POST /v1/stt/transcribe
- STT stream model: stt-stream-1.5 on native WS /v1/stt/realtime
- Enable streaming STT capabilities with interim results
CI ruff format --check failed after the streaming STT changes.
ChunkedStream early-return on blank text left the emitter unstarted,
so base end_input() raised RuntimeError. Always initialize (and flush)
so empty synthesis completes cleanly.
The transcribe endpoint only accepts ModelVersionEnum v1.0|v2.0.
stt-async-1.5 belongs to /v1/stt/execute (async jobs). Keep
stt-stream-1.5 as the realtime WebSocket default.
AgentSession stt turn-detection opens the user turn on START_OF_SPEECH.
Emit it on the first non-empty partial/final and re-arm after END_OF_SPEECH.
WebSocket audio chunks are not sample-aligned. Carry trailing odd
bytes and only fade/push even-length PCM so cast('h') never raises.
result.get("confidence", 1.0) still yields None when the key is present
with a null value, which crashes %.3f logging. Match the streaming path.
POST /v1/tts/realtime returns 404 on the public gateway — realtime TTS is
WebSocket-only. ChunkedStream now follows the same handshake as streaming
TTS (auth → speech-start → query → speech-end) so synthesize() works for
the plugin tester and any non-streaming callers.
- Point plugin docs at https://blaze.vn
- Set authors to LiveKit <hello@livekit.io>
- Empty py.typed PEP 561 marker to match sibling plugins
- Convert PCM→WAV via rtc.AudioFrame.to_wav_bytes()
- Drop custom TTS sentence batching; use framework SentenceTokenizer
- Merge all blaze unit tests into tests/test_plugin_blaze.py
@trunghlt
trunghlt force-pushed the feat/blaze-voicebot-plugin branch from b663e95 to 714ea1e Compare July 24, 2026 06:32
@trunghlt

Copy link
Copy Markdown

@tinalenguyen Thanks for the review — all points from the 2026-07-24 pass are addressed in 714ea1e7a343752b5681e46bf29a7c81bd386db5:

  1. README / URLs — site docs use https://blaze.vn (no blaze.ai leftovers in the plugin)
  2. pyproject authorsLiveKit <hello@livekit.io>
  3. py.typed — empty PEP 561 marker (matches siblings)
  4. PCM→WAVrtc.AudioFrame(...).to_wav_bytes() instead of hand-rolled RIFF headers
  5. TTS chunking — custom batch helpers removed; uses framework SentenceTokenizer (pass tokenizer= to configure); flush/stream protocol retained
  6. Tests — merged into a single tests/test_plugin_blaze.py (pytestmark = pytest.mark.unit); 52 unit tests passing locally

Please take another look when you have a chance.

devin-ai-integration[bot]

This comment was marked as resolved.

BlazeConfig accepts api_token, not auth_token (which is the per-plugin
constructor param). Align the package docstring example.
devin-ai-integration[bot]

This comment was marked as resolved.

Match llm.py: POST /v1/voicebot-call/{bot_id}/chat-conversion-stream.
devin-ai-integration[bot]

This comment was marked as resolved.

Do not early-return when chat context only has system/developer
messages. Blaze loads the voicebot prompt server-side; match agents-js
by still POSTing messages=[] so generate_reply can speak first.
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