diff --git a/backend/open_webui/routers/audio/realtime.py b/backend/open_webui/routers/audio/realtime.py index 5d1c5b0320..001afa24d2 100644 --- a/backend/open_webui/routers/audio/realtime.py +++ b/backend/open_webui/routers/audio/realtime.py @@ -413,7 +413,7 @@ async def realtime_call(ws: WebSocket): # every function call an unambiguous input_item_id, even during barge-in. 'turn_detection': { 'type': 'server_vad', - 'interrupt_response': True, + 'interrupt_response': False, 'create_response': False, }, }, diff --git a/src/lib/utils/realtime.ts b/src/lib/utils/realtime.ts index d1d76f5666..b46d1cc101 100644 --- a/src/lib/utils/realtime.ts +++ b/src/lib/utils/realtime.ts @@ -352,7 +352,6 @@ export class RealtimeCall { } else if (type === 'input_audio_buffer.speech_started') { this.receivingSpeech = event.item_id; this.userSpeaking = !this.muted; - this.stopSpeaking(); } else if (type === 'input_audio_buffer.speech_stopped') { if (this.receivingSpeech === event.item_id) this.userSpeaking = false; } else if ( @@ -375,6 +374,7 @@ export class RealtimeCall { this.flush(); return; } + this.stopSpeaking(); const session = this.session; const modelId = this.options.context().modelId; this.savingHistory++; @@ -453,8 +453,7 @@ export class RealtimeCall { if (this.animationCalls.has(event.item.call_id)) return; this.animationCalls.add(event.item.call_id); let status = 'unavailable'; - if (!response || this.interrupted.has(event.response_id) || this.receivingSpeech) - status = 'cancelled'; + if (!response || this.interrupted.has(event.response_id)) status = 'cancelled'; else { try { const args = JSON.parse(event.item.arguments);