mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-28 06:22:33 +00:00
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
This commit is contained in:
parent
97eee77568
commit
25b1156623
1 changed files with 2 additions and 2 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue