Skip to content

Gate realtime audio interruption logic to v2#14984

Merged
aibrahim-oai merged 7 commits intomainfrom
dev/realtime-v2-only-audio-gate
Mar 17, 2026
Merged

Gate realtime audio interruption logic to v2#14984
aibrahim-oai merged 7 commits intomainfrom
dev/realtime-v2-only-audio-gate

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

  • thread the realtime version into conversation start and app-server notifications
  • keep playback-aware mic gating and playback interruption behavior on v2 only, leaving v1 on the legacy path

Copy link
Copy Markdown
Collaborator

@dylan-hurd-oai dylan-hurd-oai left a comment

Choose a reason for hiding this comment

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

1 simplification suggestion

Comment on lines +747 to +758
if matches!(input_behavior, RealtimeInputBehavior::Ungated) {
*allow_input_until = None;
return true;
}

let now = Instant::now();
let RealtimeInputBehavior::PlaybackAware {
playback_queued_samples,
} = input_behavior
else {
unreachable!("ungated realtime input should return early");
};
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if matches!(input_behavior, RealtimeInputBehavior::Ungated) {
*allow_input_until = None;
return true;
}
let now = Instant::now();
let RealtimeInputBehavior::PlaybackAware {
playback_queued_samples,
} = input_behavior
else {
unreachable!("ungated realtime input should return early");
};
let playback_queued_samples = match input_behavior {
RealtimeInputBehavior::Ungated => {
*allow_input_until = None;
return true;
}
RealtimeInputBehavior::PlaybackAware {
playback_queued_samples,
} => playback_queued_samples,
};

@aibrahim-oai aibrahim-oai merged commit c6ab4ee into main Mar 17, 2026
32 checks passed
@aibrahim-oai aibrahim-oai deleted the dev/realtime-v2-only-audio-gate branch March 17, 2026 22:24
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants