mirror of
https://github.com/open-webui/open-webui
synced 2024-11-07 09:09:53 +00:00
feat: voice interruption toggle
This commit is contained in:
parent
98c18b3032
commit
d0f34baaa3
@ -271,7 +271,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (assistantSpeaking) {
|
||||
if (assistantSpeaking && !($settings?.voiceInterruption ?? false)) {
|
||||
// Mute the audio if the assistant is speaking
|
||||
analyser.maxDecibels = 0;
|
||||
analyser.minDecibels = -1;
|
||||
|
@ -32,6 +32,7 @@
|
||||
let chatDirection: 'LTR' | 'RTL' = 'LTR';
|
||||
|
||||
let showEmojiInCall = false;
|
||||
let voiceInterruption = false;
|
||||
|
||||
const toggleSplitLargeChunks = async () => {
|
||||
splitLargeChunks = !splitLargeChunks;
|
||||
@ -58,6 +59,11 @@
|
||||
saveSettings({ showEmojiInCall: showEmojiInCall });
|
||||
};
|
||||
|
||||
const toggleVoiceInterruption = async () => {
|
||||
voiceInterruption = !voiceInterruption;
|
||||
saveSettings({ voiceInterruption: voiceInterruption });
|
||||
};
|
||||
|
||||
const toggleUserLocation = async () => {
|
||||
userLocation = !userLocation;
|
||||
|
||||
@ -128,6 +134,7 @@
|
||||
showUsername = $settings.showUsername ?? false;
|
||||
|
||||
showEmojiInCall = $settings.showEmojiInCall ?? false;
|
||||
voiceInterruption = $settings.voiceInterruption ?? false;
|
||||
|
||||
chatBubble = $settings.chatBubble ?? true;
|
||||
widescreenMode = $settings.widescreenMode ?? false;
|
||||
@ -399,6 +406,26 @@
|
||||
|
||||
<div class=" my-1.5 text-sm font-medium">{$i18n.t('Voice')}</div>
|
||||
|
||||
<div>
|
||||
<div class=" py-0.5 flex w-full justify-between">
|
||||
<div class=" self-center text-xs">{$i18n.t('Voice Interruption in Call')}</div>
|
||||
|
||||
<button
|
||||
class="p-1 px-3 text-xs flex rounded transition"
|
||||
on:click={() => {
|
||||
toggleVoiceInterruption();
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
{#if voiceInterruption === true}
|
||||
<span class="ml-2 self-center">{$i18n.t('On')}</span>
|
||||
{:else}
|
||||
<span class="ml-2 self-center">{$i18n.t('Off')}</span>
|
||||
{/if}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class=" py-0.5 flex w-full justify-between">
|
||||
<div class=" self-center text-xs">{$i18n.t('Display Emoji in Call')}</div>
|
||||
|
Loading…
Reference in New Issue
Block a user