Skip to content

Fixing an issue in RTVI where we were sometimes receiving bot output messages before the bot started speaking.#3718

Merged
filipi87 merged 2 commits intomainfrom
filipi/bot_started_speaking
Feb 12, 2026
Merged

Fixing an issue in RTVI where we were sometimes receiving bot output messages before the bot started speaking.#3718
filipi87 merged 2 commits intomainfrom
filipi/bot_started_speaking

Conversation

@filipi87
Copy link
Copy Markdown
Contributor

@filipi87 filipi87 commented Feb 11, 2026

Summary

  • Fixed a race condition in RTVIObserver where aggregated LLM text messages could be sent before the bot started speaking event
  • Added queueing mechanism to ensure bot output messages are sent in the correct order
  • Bot output messages are now queued until BotStartedSpeakingFrame is received, then flushed in order

Technical Details

The issue occurred when AggregatedTextFrame instances arrived before the BotStartedSpeakingFrame, causing clients to receive bot output messages before the bot-started-speaking event. This could break client side logic that depends on proper event ordering.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 25.00000% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pipecat/processors/frameworks/rtvi.py 25.00% 9 Missing ⚠️
Files with missing lines Coverage Δ
src/pipecat/processors/frameworks/rtvi.py 54.18% <25.00%> (-0.27%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@markbackman markbackman left a comment

Choose a reason for hiding this comment

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

LGTM! Nice catch.

@filipi87 filipi87 merged commit e065907 into main Feb 12, 2026
6 checks passed
@filipi87 filipi87 deleted the filipi/bot_started_speaking branch February 12, 2026 21:31
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