Skip to content

Accept inbound RTVI speaking signals as turn frames - #5715

Open
kixelated wants to merge 2 commits into
pipecat-ai:mainfrom
kixelated:inbound-rtvi-speaking
Open

Accept inbound RTVI speaking signals as turn frames#5715
kixelated wants to merge 2 commits into
pipecat-ai:mainfrom
kixelated:inbound-rtvi-speaking

Conversation

@kixelated

Copy link
Copy Markdown
Contributor

Summary

RTVI speaking messages (user-started-speaking / user-stopped-speaking and the raw vad-user-* pair) were server-to-client only. A cooperating client that runs VAD at the microphone could not drive the bot's turn boundaries.

This makes those types inbound as well:

  • user-started-speaking / user-stopped-speaking become ProposedUserStartedSpeakingFrame / ProposedUserStoppedSpeakingFrame, so ExternalUserTurnStrategies owns barge-in instead of adopting an already-announced turn (which would skip the interruption).
  • vad-user-started-speaking / vad-user-stopped-speaking become VADUserStartedSpeakingFrame / VADUserStoppedSpeakingFrame, so the default VAD start strategy works without a server-side analyzer.

Unknown types still fail loud. Server-to-client emission is unchanged.

Test plan

  • tests/test_rtvi_processor.py::TestRTVIInboundSpeaking covers the four mappings and that _handle_message does not send an unsupported-type error.

(written by grok-4.6)

kixelated and others added 2 commits September 11, 2026 23:44
A cooperating client that runs VAD at the microphone can now send
user-started-speaking / user-stopped-speaking (and the raw vad-user-*
pair) client-to-server. Turn messages become proposals so
ExternalUserTurnStrategies owns barge-in; VAD messages become VAD
frames so the default VAD start strategy works without a server
analyzer.

Co-Authored-By: grok-4.6 <noreply@x.ai>
Co-Authored-By: grok-4.6 <noreply@x.ai>
@kixelated
kixelated marked this pull request as ready for review September 12, 2026 06:47
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/pipecat/processors/frameworks/rtvi/models.py 100.00% <ø> (ø)
...rc/pipecat/processors/frameworks/rtvi/processor.py 59.69% <100.00%> (+6.52%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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