mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-14 04:08:46 +00:00
fix: wind and other noise no longer cut off the assistant in Realtime Voice calls
In a Realtime Voice call, any loud sound like wind on a phone or passing traffic stopped the assistant mid-sentence as if you had spoken, and the answer was lost. The assistant now keeps talking through noise and only stops once what you said has been transcribed into words, so even a single "Ja" still stops it. The tradeoff is that talking over the assistant stops it a little later than before, after you pause and your words are transcribed. Fixes #32248
This commit is contained in:
parent
40df1542ce
commit
86de14cff9
2 changed files with 3 additions and 4 deletions
|
|
@ -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,
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue