From 3e2d2c71593feafe841fba03c6393ebb0efe9cf0 Mon Sep 17 00:00:00 2001 From: aumeh Date: Sun, 19 Apr 2026 06:47:50 -0600 Subject: [PATCH] Simple Mute/Unmute feature in Voice Mode. Intentionally designed so that the AI won't think/move forward until "Unmute" is pressed. Voice Modes in other AI tools have similar features so closing that gap with OpenWebUI. Tested locally on 0.8.12 fork. No changes anywhere other than the voice mode feature of openwebui (not dictation or etc) --- .../chat/MessageInput/CallOverlay.svelte | 54 ++++++++++++++++++- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/MessageInput/CallOverlay.svelte b/src/lib/components/chat/MessageInput/CallOverlay.svelte index d5977c0eb0..99b05b0fbe 100644 --- a/src/lib/components/chat/MessageInput/CallOverlay.svelte +++ b/src/lib/components/chat/MessageInput/CallOverlay.svelte @@ -43,6 +43,16 @@ let mediaRecorder; let audioStream = null; let audioChunks = []; + let isMuted = false; + + const toggleMute = () => { + isMuted = !isMuted; + if (audioStream) { + audioStream.getAudioTracks().forEach((track) => { + track.enabled = !isMuted; + }); + } + }; let videoInputDevices = []; let selectedVideoInputDeviceId = null; @@ -305,6 +315,12 @@ return; } + if (isMuted) { + rmsLevel = 0; + window.requestAnimationFrame(processFrame); + return; + } + if (assistantSpeaking && !($settings?.voiceInterruption ?? false)) { // Mute the audio if the assistant is speaking analyser.maxDecibels = 0; @@ -943,7 +959,39 @@ {/if} -
+
+ + + +