Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
d0f34baa
Commit
d0f34baa
authored
Jun 22, 2024
by
Timothy J. Baek
Browse files
feat: voice interruption toggle
parent
98c18b30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
src/lib/components/chat/MessageInput/CallOverlay.svelte
src/lib/components/chat/MessageInput/CallOverlay.svelte
+1
-1
src/lib/components/chat/Settings/Interface.svelte
src/lib/components/chat/Settings/Interface.svelte
+27
-0
No files found.
src/lib/components/chat/MessageInput/CallOverlay.svelte
View file @
d0f34baa
...
...
@@ -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
;
...
...
src/lib/components/chat/Settings/Interface.svelte
View file @
d0f34baa
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment