Skip to content

fix(room_io): don't re-fire playbackStarted on resume - #2184

Merged
chenghao-mou merged 1 commit into
mainfrom
fix/playback-started-resume
Jul 31, 2026
Merged

fix(room_io): don't re-fire playbackStarted on resume#2184
chenghao-mou merged 1 commit into
mainfrom
fix/playback-started-resume

Conversation

@rosetta-livekit-bot

@rosetta-livekit-bot rosetta-livekit-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Ports livekit/agents#6636.

Summary

  • preserve the per-segment playbackStarted latch across mid-segment pause/resume
  • add the matching pause/resume regression test
  • add a patch changeset for @livekit/agents

Validation

  • pnpm test agents (111 files passed, 1510 tests passed, 5 skipped)
  • pnpm build
  • pnpm lint
  • cue-cli voice-mode runtime assertion: agent entered AS_SPEAKING and committed an ASSISTANT conversation item
Source diff coverage
Source file Classification Target coverage
livekit-agents/livekit/agents/voice/room_io/_output.py Adapted agents/src/voice/room_io/_output.ts: preserve the JS firstFrameEmitted latch across resume(); it corresponds to the Python _first_frame_event and remains reset at segment completion.
tests/test_room_io.py Adapted agents/src/voice/room_io/_output.test.ts: port the source regression scenario into the target co-located output suite, asserting one playbackStarted before and after a mid-segment pause/resume.

No source files were omitted and no supporting infrastructure gap exists in the target. The changeset is target-only release metadata.


Ported from livekit/agents#6636

Original PR description

fix _SegmentSynchronizerImpl.on_playback_started called after start_fut is set warning after resumed false interrupted speech

@rosetta-livekit-bot
rosetta-livekit-bot Bot requested a review from a team as a code owner July 31, 2026 02:18
@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1d80485

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

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

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

@rosetta-livekit-bot
rosetta-livekit-bot Bot requested a review from longcw July 31, 2026 02:18

@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 1 additional finding.

Open in Devin Review

@chenghao-mou
chenghao-mou enabled auto-merge (squash) July 31, 2026 09:59
@chenghao-mou
chenghao-mou merged commit 0daf8d6 into main Jul 31, 2026
6 checks passed
@chenghao-mou
chenghao-mou deleted the fix/playback-started-resume branch July 31, 2026 10:00
@github-actions github-actions Bot mentioned this pull request Jul 31, 2026
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.

1 participant