mirror of
https://github.com/open-webui/open-webui
synced 2024-11-22 08:07:55 +00:00
fix: user voice should update when global voice updates
This commit is contained in:
parent
9d5e3e2a91
commit
0c6284be02
@ -253,7 +253,9 @@
|
||||
for (const [idx, sentence] of sentences.entries()) {
|
||||
const res = await synthesizeOpenAISpeech(
|
||||
localStorage.token,
|
||||
$settings?.audio?.tts?.voice ?? $config?.audio?.tts?.voice,
|
||||
$settings?.audio?.tts?.defaultVoice === $config.audio.tts.voice
|
||||
? $settings?.audio?.tts?.voice ?? $config?.audio?.tts?.voice
|
||||
: $config?.audio?.tts?.voice,
|
||||
sentence
|
||||
).catch((error) => {
|
||||
toast.error(error);
|
||||
|
@ -61,7 +61,13 @@
|
||||
responseAutoPlayback = $settings.responseAutoPlayback ?? false;
|
||||
|
||||
STTEngine = $settings?.audio?.stt?.engine ?? '';
|
||||
voice = $settings?.audio?.tts?.voice ?? $config.audio.tts.voice ?? '';
|
||||
|
||||
if ($settings?.audio?.tts?.defaultVoice === $config.audio.tts.voice) {
|
||||
voice = $settings?.audio?.tts?.voice ?? $config.audio.tts.voice ?? '';
|
||||
} else {
|
||||
voice = $config.audio.tts.voice ?? '';
|
||||
}
|
||||
|
||||
nonLocalVoices = $settings.audio?.tts?.nonLocalVoices ?? false;
|
||||
|
||||
await getVoices();
|
||||
@ -78,6 +84,7 @@
|
||||
},
|
||||
tts: {
|
||||
voice: voice !== '' ? voice : undefined,
|
||||
defaultVoice: $config?.audio?.tts?.voice ?? '',
|
||||
nonLocalVoices: $config.audio.tts.engine === '' ? nonLocalVoices : undefined
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user