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
- 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
b663e95 to
714ea1e
Compare
|
@tinalenguyen Thanks for the review — all points from the 2026-07-24 pass are addressed in
Please take another look when you have a chance. |
BlazeConfig accepts api_token, not auth_token (which is the per-plugin constructor param). Align the package docstring example.
Match llm.py: POST /v1/voicebot-call/{bot_id}/chat-conversion-stream.
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.
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.