mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-16 23:43:03 +00:00
fix: hoist lastSoundTime to component scope so mute timer reset works
This commit is contained in:
parent
d1d78cf771
commit
ac29dad06b
1 changed files with 2 additions and 1 deletions
|
|
@ -44,6 +44,7 @@
|
|||
let audioStream = null;
|
||||
let audioChunks = [];
|
||||
let isMuted = false;
|
||||
let lastSoundTime = Date.now();
|
||||
|
||||
const toggleMute = () => {
|
||||
isMuted = !isMuted;
|
||||
|
|
@ -312,7 +313,7 @@
|
|||
const domainData = new Uint8Array(bufferLength);
|
||||
const timeDomainData = new Uint8Array(analyser.fftSize);
|
||||
|
||||
let lastSoundTime = Date.now();
|
||||
lastSoundTime = Date.now();
|
||||
hasStartedSpeaking = false;
|
||||
|
||||
console.log('🔊 Sound detection started', lastSoundTime, hasStartedSpeaking);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue