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
8f03daea
Commit
8f03daea
authored
Jun 03, 2024
by
Jun Siang Cheah
Browse files
fix: selected local tts voice not shown in settings
parent
de03bf83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
src/lib/components/chat/Settings/Audio.svelte
src/lib/components/chat/Settings/Audio.svelte
+15
-6
No files found.
src/lib/components/chat/Settings/Audio.svelte
View file @
8f03daea
...
...
@@ -14,6 +14,7 @@
let
OpenAIUrl
=
''
;
let
OpenAIKey
=
''
;
let
OpenAISpeaker
=
''
;
let
STTEngines
=
[
''
,
'openai'
];
let
STTEngine
=
''
;
...
...
@@ -88,14 +89,14 @@
url
:
OpenAIUrl
,
key
:
OpenAIKey
,
model
:
model
,
speaker
:
s
peaker
speaker
:
OpenAIS
peaker
});
if
(
res
)
{
OpenAIUrl
=
res
.
OPENAI_API_BASE_URL
;
OpenAIKey
=
res
.
OPENAI_API_KEY
;
model
=
res
.
OPENAI_API_MODEL
;
s
peaker
=
res
.
OPENAI_API_VOICE
;
OpenAIS
peaker
=
res
.
OPENAI_API_VOICE
;
}
}
};
...
...
@@ -125,7 +126,10 @@
OpenAIUrl
=
res
.
OPENAI_API_BASE_URL
;
OpenAIKey
=
res
.
OPENAI_API_KEY
;
model
=
res
.
OPENAI_API_MODEL
;
speaker
=
res
.
OPENAI_API_VOICE
;
OpenAISpeaker
=
res
.
OPENAI_API_VOICE
;
if
(
TTSEngine
===
'openai'
)
{
speaker
=
OpenAISpeaker
;
}
}
}
});
...
...
@@ -141,7 +145,12 @@
audio
:
{
STTEngine
:
STTEngine
!== '' ? STTEngine : undefined,
TTSEngine
:
TTSEngine
!== '' ? TTSEngine : undefined,
speaker
:
speaker
!== '' ? speaker : undefined,
speaker
:
(
TTSEngine
===
'openai'
?
OpenAISpeaker
:
speaker
)
!== ''
?
TTSEngine
===
'openai'
?
OpenAISpeaker
:
speaker
:
undefined
,
model
:
model
!== '' ? model : undefined,
nonLocalVoices
:
nonLocalVoices
}
...
...
@@ -231,7 +240,7 @@
on
:
change
={(
e
)
=>
{
if
(
e
.
target
.
value
===
'openai'
)
{
getOpenAIVoices
();
s
peaker
=
'alloy'
;
OpenAIS
peaker
=
'alloy'
;
model
=
'tts-1'
;
}
else
{
getWebAPIVoices
();
...
...
@@ -324,7 +333,7 @@
<
input
list
=
"voice-list"
class
=
"w-full rounded-lg py-2 px-4 text-sm dark:text-gray-300 dark:bg-gray-850 outline-none"
bind
:
value
={
s
peaker
}
bind
:
value
={
OpenAIS
peaker
}
placeholder
=
"Select a voice"
/>
...
...
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