Skip to content

Commit 1973bef

Browse files
aibrahim-oaicodex
andcommitted
Remove local realtime playback interruption
Co-authored-by: Codex <noreply@openai.com>
1 parent e8cec2e commit 1973bef

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

codex-rs/tui/src/chatwidget/realtime.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,11 @@ impl ChatWidget {
302302
RealtimeEvent::SessionUpdated { session_id, .. } => {
303303
self.realtime_conversation.session_id = Some(session_id);
304304
}
305-
RealtimeEvent::InputAudioSpeechStarted(_) => self.interrupt_realtime_audio_playback(),
305+
RealtimeEvent::InputAudioSpeechStarted(_) => {}
306306
RealtimeEvent::InputTranscriptDelta(_) => {}
307307
RealtimeEvent::OutputTranscriptDelta(_) => {}
308308
RealtimeEvent::AudioOut(frame) => self.enqueue_realtime_audio_out(&frame),
309-
RealtimeEvent::ResponseCancelled(_) => self.interrupt_realtime_audio_playback(),
309+
RealtimeEvent::ResponseCancelled(_) => {}
310310
RealtimeEvent::ConversationItemAdded(_item) => {}
311311
RealtimeEvent::ConversationItemDone { .. } => {}
312312
RealtimeEvent::HandoffRequested(_) => {}
@@ -368,16 +368,6 @@ impl ChatWidget {
368368
}
369369
}
370370

371-
#[cfg(not(target_os = "linux"))]
372-
fn interrupt_realtime_audio_playback(&mut self) {
373-
if let Some(player) = &self.realtime_conversation.audio_player {
374-
player.clear();
375-
}
376-
}
377-
378-
#[cfg(target_os = "linux")]
379-
fn interrupt_realtime_audio_playback(&mut self) {}
380-
381371
#[cfg(not(target_os = "linux"))]
382372
fn start_realtime_local_audio(&mut self) {
383373
if self.realtime_conversation.capture_stop_flag.is_some() {

0 commit comments

Comments
 (0)