Skip to content

Emit RTVI events for user mute/unmute#3687

Merged
markbackman merged 1 commit intomainfrom
mb/rtvi-mute-events
Feb 9, 2026
Merged

Emit RTVI events for user mute/unmute#3687
markbackman merged 1 commit intomainfrom
mb/rtvi-mute-events

Conversation

@markbackman
Copy link
Copy Markdown
Contributor

@markbackman markbackman commented Feb 9, 2026

Summary

  • Added UserMuteStartedFrame / UserMuteStoppedFrame system frames to bridge mute strategy state changes into the frame pipeline
  • LLMUserAggregator now pushes these frames alongside the existing on_user_mute_started / on_user_mute_stopped event handlers, enabling RTVIObserver to observe mute transitions
  • Added RTVIUserMuteStartedMessage (user-mute-started) and RTVIUserMuteStoppedMessage (user-mute-stopped) RTVI message types so clients can react to mute state changes
  • Added user_mute_enabled param to RTVIObserverParams (defaults to True) for controlling emission

Testing

  • All existing tests pass (568 passed, 1 skipped)
  • Ruff lint/format checks pass

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 9, 2026

Codecov Report

❌ Patch coverage is 70.83333% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pipecat/processors/frameworks/rtvi.py 56.25% 7 Missing ⚠️
Files with missing lines Coverage Δ
src/pipecat/frames/frames.py 89.20% <100.00%> (+0.31%) ⬆️
...t/processors/aggregators/llm_response_universal.py 77.55% <100.00%> (+0.09%) ⬆️
src/pipecat/processors/frameworks/rtvi.py 54.45% <56.25%> (+0.07%) ⬆️

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@markbackman markbackman force-pushed the mb/rtvi-mute-events branch 2 times, most recently from ed29284 to a546ce9 Compare February 9, 2026 17:31
# Emit mute state change events
if self._user_is_muted:
await self._call_event_handler("on_user_mute_started")
await self.push_frame(UserMuteStartedFrame())
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.

We should broadcast since this is signalling everyone. Same below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Add UserMuteStartedFrame/UserMuteStoppedFrame and corresponding RTVI
messages so clients can observe when mute strategies activate/deactivate.
@aconchillo
Copy link
Copy Markdown
Contributor

LGTM!

@markbackman markbackman merged commit 3ff9b7b into main Feb 9, 2026
5 of 6 checks passed
@markbackman markbackman deleted the mb/rtvi-mute-events branch February 9, 2026 20:18
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