Skip to content

Inworld tts auto mode#4655

Merged
tinalenguyen merged 1 commit intolivekit:mainfrom
ianbbqzy:ian/tts-auto-mode
Feb 13, 2026
Merged

Inworld tts auto mode#4655
tinalenguyen merged 1 commit intolivekit:mainfrom
ianbbqzy:ian/tts-auto-mode

Conversation

@ianbbqzy
Copy link
Contributor

@ianbbqzy ianbbqzy commented Jan 29, 2026

auto_mode to be added to config param in a separate PR when word tokenizer and user-controlled manual flushes are supported. For now, auto_mode should enhance quality and naturalness of agent response

Summary by CodeRabbit

  • Updates
    • Auto Mode enabled for Inworld TTS operations.
    • Streaming text now flushes context more frequently during transmission, improving responsiveness and reducing latency for long messages.

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


Open with Devin

@CLAassistant
Copy link

CLAassistant commented Jan 29, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Ian Lee seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 29, 2026

📝 Walkthrough

Walkthrough

The Inworld TTS plugin now sets autoMode to True when creating a WebSocket context and calls flush_context inside the per-chunk sending loop (after each ~1000-character chunk) instead of only once after all chunks are sent.

Changes

Cohort / File(s) Summary
Inworld TTS Auto Mode & Flushing
livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/tts.py
Set pkt["create"]["autoMode"] = True when creating the WebSocket context. Moved flush_context into the per-chunk send loop so it runs after each ~1000-character chunk; marked as temporary until auto_mode is released.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

I nibble bytes and polish code with care,
AutoMode set true — a bright new hare!
Flush after chunks, hop by hop I bound,
Temporary steps where changes are found,
A rabbit cheers at fixes neatly sound. 🐇✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% 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 '[Draft] inworld tts auto mode' clearly describes the main change: enabling auto mode for inworld TTS. It directly relates to the implementation of auto_mode behavior in the TTS module.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/tts.py`:
- Around line 358-359: The unconditional setting of pkt["create"]["autoMode"] =
True (in the TTS packet creation where SentenceTokenizer is used) should be
removed or gated to avoid sending an undocumented field; change this to follow
the existing pattern used for timestampType/applyTextNormalization (only set
autoMode if the corresponding config value is provided/is_given()), or otherwise
remove the line and/or wrap the send in graceful error handling to ignore server
rejections related to unknown fields; update the code around the packet
construction in the TTS send/create logic (the block that references
SentenceTokenizer and pkt["create"]) to implement the conditional check or
removal.
🧹 Nitpick comments (1)
livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/tts.py (1)

1081-1086: Gate flush_context behind a flag when autoMode is enabled.

Currently, flush_context is called after every sentence token. With autoMode enabled (which is unconditional), the Inworld server handles buffering internally, making per-token flushes redundant and increasing message overhead. Consider gating this behind a flag or removing it entirely in favor of explicit flushes via user input or end_input().

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 618c4b530c21160498255af0e3a0946c3dd24f04 and 05953141b98c71fab26a65a62ef7b4f6a71fe57d.

📒 Files selected for processing (1)
  • livekit-plugins/livekit-plugins-inworld/livekit/plugins/inworld/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-inworld/livekit/plugins/inworld/tts.py
⏰ 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). (1)
  • GitHub Check: unit-tests

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

Copy link
Contributor

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

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 5 additional flags.

Open in Devin Review

@ianbbqzy ianbbqzy force-pushed the ian/tts-auto-mode branch 3 times, most recently from 06d67bd to dc2e179 Compare February 5, 2026 00:18
@ianbbqzy ianbbqzy changed the title [Draft] inworld tts auto mode Inworld tts auto mode Feb 10, 2026
@toubatbrian toubatbrian requested a review from a team February 12, 2026 01:33
@toubatbrian
Copy link
Contributor

cc @theomonnom @longcw

Copy link
Member

@tinalenguyen tinalenguyen left a comment

Choose a reason for hiding this comment

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

thanks for the PR! are you still unable to sign the CLA?

fix timestamps cumulation

* each generation resets timestamps offset to 1
* should keep timestamps monotonically increasing within an agent turn
@ianbbqzy
Copy link
Contributor Author

thanks for the PR! are you still unable to sign the CLA?

Doesn't look like so. This comment from CLAassistant also seems weird

Ian Lee seems not to be a GitHub user.

@tinalenguyen tinalenguyen merged commit e3d299d into livekit:main Feb 13, 2026
7 of 9 checks passed
@tinalenguyen
Copy link
Member

I used to see those when pushing from different devices and I needed to re-authorize my GH account for one, not sure if that's the case here

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