Skip to content

feat(bland): BTTS ws integration - #2310

Open
rosetta-livekit-bot[bot] wants to merge 1 commit into
weary-pickling-prolongfrom
exactly-oafs-molest
Open

feat(bland): BTTS ws integration#2310
rosetta-livekit-bot[bot] wants to merge 1 commit into
weary-pickling-prolongfrom
exactly-oafs-molest

Conversation

@rosetta-livekit-bot

@rosetta-livekit-bot rosetta-livekit-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Ports livekit/agents#6752 to the Bland TypeScript plugin.

Summary

  • add native realtime text streaming over Bland's /v2/tts/ws endpoint
  • pool initialized sessions and preserve cancellation, retry, error, and option-invalidation semantics
  • keep HTTP synthesis available, including an HTTP-only streaming: false mode
  • default to Bland's River voice and document the new behavior
  • add the ws runtime dependency and a minor Bland changeset for the new public streaming API

Validation

  • pnpm test plugins/bland/src/tts.test.ts --silent (51 passed, 1 credential-dependent integration skipped)
  • pnpm build --filter=@livekit/agents-plugin-bland...
  • pnpm lint --filter=@livekit/agents-plugin-bland
  • pnpm api:check --filter=@livekit/agents-plugin-bland
  • pnpm exec prettier --check "plugins/bland/**/*.{ts,tsx,md,json}" ".changeset/fresh-rivers-stream.md"
  • cue-cli voice-mode validation with the built Bland plugin and a local protocol-compatible server: reached AS_SPEAKING, reported Bland TTS usage, committed the assistant message, and returned to AS_LISTENING without an error event
Source diff coverage

Source diff coverage

  • livekit-plugins/livekit-plugins-bland/README.md: adapted to plugins/bland/README.md, preserving realtime WebSocket/input-streaming guidance, HTTP-only synthesize() behavior, streaming: false guidance, and the Bland realtime TTS reference in the target README format.
  • livekit-plugins/livekit-plugins-bland/livekit/plugins/bland/__init__.py: adapted through plugins/bland/src/index.ts; its existing wildcard export exposes the new public SynthesizeStream, so no redundant index edit was needed.
  • livekit-plugins/livekit-plugins-bland/livekit/plugins/bland/tts.py: adapted to plugins/bland/src/tts.ts, including the complete WebSocket protocol, 50-second pooled sessions, 500 ms bounded cancellation drain, retry/error classification, option invalidation, prewarm/close lifecycle, disabled-streaming mode, River default, and preserved HTTP synthesis. Target-required support was added in plugins/bland/package.json, pnpm-lock.yaml, plugins/bland/etc/agents-plugin-bland.api.md, and .changeset/fresh-rivers-stream.md.
  • tests/test_plugin_bland_tts.py: adapted to plugins/bland/src/tts.test.ts, porting the source-added and source-modified coverage with Vitest and local WebSocket servers while retaining existing target HTTP coverage.
  • Not applicable: none. No source behavior or required infrastructure was omitted.

Ported from livekit/agents#6752

Original PR description
  • Websocket-based realtime streaming through /v2/tts/ws endpoint
  • Proper input streaming (ex. from an LLM text stream) is supported now
  • Significant improvements to latency all around

@rosetta-livekit-bot
rosetta-livekit-bot Bot requested a review from a team as a code owner August 20, 2026 16:54
@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ed8a709

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 40 packages
Name Type
@livekit/agents-plugin-bland Major
@livekit/agents Major
@livekit/agents-plugin-anam Major
@livekit/agents-plugin-anthropic Major
@livekit/agents-plugin-assemblyai Major
@livekit/agents-plugin-azure Major
@livekit/agents-plugin-baseten Major
@livekit/agents-plugin-bey Major
@livekit/agents-plugin-cartesia Major
@livekit/agents-plugin-cerebras Major
@livekit/agents-plugin-deepgram Major
@livekit/agents-plugin-did Major
@livekit/agents-plugin-elevenlabs Major
@livekit/agents-plugin-fishaudio Major
@livekit/agents-plugin-google Major
@livekit/agents-plugin-hedra Major
@livekit/agents-plugin-hume Major
@livekit/agents-plugin-inworld Major
@livekit/agents-plugin-krisp Major
@livekit/agents-plugin-lemonslice Major
@livekit/agents-plugin-liveavatar Major
@livekit/agents-plugin-livekit Major
@livekit/agents-plugin-minimax Major
@livekit/agents-plugin-mistral Major
@livekit/agents-plugin-mistralai Major
@livekit/agents-plugin-neuphonic Major
@livekit/agents-plugin-openai Major
@livekit/agents-plugin-perplexity Major
@livekit/agents-plugin-phonic Major
@livekit/agents-plugin-protoface Major
@livekit/agents-plugin-resemble Major
@livekit/agents-plugin-rime Major
@livekit/agents-plugin-runway Major
@livekit/agents-plugin-sarvam Major
@livekit/agents-plugin-silero Major
@livekit/agents-plugin-soniox Major
@livekit/agents-plugin-tavus Major
@livekit/agents-plugin-trugen Major
@livekit/agents-plugin-xai Major
@livekit/agents-plugins-test Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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.

0 participants