Skip to content

Conversation

@plangary
Copy link
Contributor

@plangary plangary commented Jan 17, 2026

Summary by CodeRabbit

  • New Features
    • Resemble TTS model selection: Users can now specify and update their preferred text-to-speech model—choose between "chatterbox" or "chatterbox-turbo"—during initialization or at runtime. The selected model is properly transmitted to the Resemble API for both standard and streaming synthesis operations.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 17, 2026

📝 Walkthrough

Walkthrough

Add model parameter support to Resemble TTS plugin, enabling users to specify TTS models during initialization and updates. Model is included in REST and WebSocket API payloads when provided.

Changes

Cohort / File(s) Summary
Type Definition & Package Exports
models.py, __init__.py
Introduces TTSModels type alias for supported models ("chatterbox", "chatterbox-turbo") and exports it from package
TTS Model Parameter Integration
tts.py
Adds model parameter to TTS.__init__() and update_options(). Stores in _TTSOptions dataclass, exposes via model property, conditionally includes in REST/WebSocket API payloads

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 wiggles nose happily
Model choices bloom like carrots in spring,
Chatterbox voices ready to sing!
From REST to WebSocket they flow,
Parameters dancing to and fro,
TTS evolved, and it steals the show! 🎤

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Chatterbox model support' directly reflects the main change: adding support for Chatterbox models (chatterbox and chatterbox-turbo) to the Resemble TTS plugin.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

🧹 Recent nitpick comments
livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/tts.py (1)

156-157: Inconsistent null-handling between voice_uuid and model.

voice_uuid uses a truthy check (or), while model uses an explicit None check. This means passing an empty string for model would set it to "", but passing an empty string for voice_uuid would preserve the existing value.

If this is intentional (e.g., to allow clearing the model), consider adding a brief comment. Otherwise, align the behavior:

♻️ Option to align with voice_uuid behavior
         self._opts.voice_uuid = voice_uuid or self._opts.voice_uuid
-        self._opts.model = model if model is not None else self._opts.model
+        self._opts.model = model or self._opts.model
📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d97b05 and 894275e.

📒 Files selected for processing (3)
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/__init__.py
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/models.py
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/tts.py
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Format code with ruff
Run ruff linter and auto-fix issues
Run mypy type checker in strict mode
Maintain line length of 100 characters maximum
Ensure Python 3.9+ compatibility
Use Google-style docstrings

Files:

  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/__init__.py
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/models.py
  • livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/tts.py
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: livekit/agents PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-16T07:44:56.353Z
Learning: Implement Model Interface Pattern for STT, TTS, LLM, and Realtime models with provider-agnostic interfaces, fallback adapters for resilience, and stream adapters for different streaming patterns
🧬 Code graph analysis (2)
livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/__init__.py (1)
livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/tts.py (3)
  • TTS (54-176)
  • ChunkedStream (179-242)
  • SynthesizeStream (245-374)
livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/tts.py (8)
livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/tts.py (2)
  • model (204-205)
  • _ensure_session (211-214)
livekit-agents/livekit/agents/tts/tts.py (1)
  • model (89-98)
livekit-plugins/livekit-plugins-google/livekit/plugins/google/tts.py (1)
  • model (174-175)
livekit-plugins/livekit-plugins-speechmatics/livekit/plugins/speechmatics/tts.py (2)
  • model (88-89)
  • _ensure_session (95-98)
livekit-plugins/livekit-plugins-azure/livekit/plugins/azure/tts.py (2)
  • model (191-192)
  • _ensure_session (217-220)
livekit-plugins/livekit-plugins-deepgram/livekit/plugins/deepgram/stt.py (1)
  • _ensure_session (187-191)
livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/stt.py (1)
  • _ensure_session (94-97)
livekit-plugins/livekit-plugins-neuphonic/livekit/plugins/neuphonic/tts.py (1)
  • _ensure_session (149-153)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: type-check (3.13)
  • GitHub Check: type-check (3.9)
  • GitHub Check: unit-tests
🔇 Additional comments (8)
livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/__init__.py (1)

20-24: LGTM!

The import and export of TTSModels are correctly added, making the type publicly accessible for consumers of this plugin.

livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/tts.py (6)

39-39: LGTM!

Import is correctly added.


46-51: LGTM!

The model field correctly uses str | None to store the resolved model value, accommodating both the TTSModels literal values and arbitrary strings.


60-60: LGTM!

The model parameter signature is well-designed, accepting both the type-safe TTSModels literal and arbitrary strings for flexibility.


114-116: LGTM!

The model property implementation is consistent with other TTS plugins (e.g., ElevenLabs, Google) and properly falls back to "unknown" when no model is configured.


189-196: LGTM!

The conditional inclusion of model in the payload is the right approach—it avoids sending unnecessary fields to the API when no model is specified.


323-332: LGTM!

WebSocket payload construction mirrors the REST approach with proper conditional model inclusion.

livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/models.py (1)

7-9: Type alias correctly defined with valid model names.

The TTSModels Literal type provides good type safety for model selection. Both "chatterbox" and "chatterbox-turbo" are valid Resemble AI TTS models—chatterbox is the open-source zero-shot variant with emotion controls, and chatterbox-turbo is the 350M-parameter efficiency variant optimized for low-latency real-time agents.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

PCM_16 = "PCM_16"


TTSModels = Literal["chatterbox", "chatterbox-turbo"]
Copy link
Member

Choose a reason for hiding this comment

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

we should include other resemble models. if no explicit name, we could call it resemble

that should be the default model as that's the current behavior..

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.

2 participants