From 25b115662396a9e09ee115008f4516aaa2eebd1d Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Tue, 20 Oct 2026 19:17:06 +0200 Subject: [PATCH] fix: Realtime call answers twice when a short pause splits a sentence (#32773) In a Realtime call, a short pause mid-sentence can make the Realtime provider split the sentence into two turns. If you kept talking before the first half was transcribed, Open WebUI asked the voice model for one reply per half. The voice model hears the whole conversation each time, so both replies answered the full sentence and you heard the same answer twice, the second one about 15 seconds later. Now Open WebUI asks the voice model only once, after the last half, and that one reply covers the whole sentence. Fixes #32764 --- src/lib/utils/realtime.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/utils/realtime.ts b/src/lib/utils/realtime.ts index 5d65046f6e..771fef9b11 100644 --- a/src/lib/utils/realtime.ts +++ b/src/lib/utils/realtime.ts @@ -261,8 +261,8 @@ export class RealtimeCall { ) return; if (command.type === 'bridge.respond' && command.item_id) { - const index = this.commands.findIndex((item) => !item.item_id); - this.commands.splice(index < 0 ? this.commands.length : index, 0, command); + // The newest reply hears every transcript, so older unsent ones are redundant. + this.commands = [command, ...this.commands.filter((item) => !item.item_id)]; } else this.commands.push(command); this.flush(); }