diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 3e9c755c0..011d77254 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -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); diff --git a/src/lib/components/chat/Settings/Audio.svelte b/src/lib/components/chat/Settings/Audio.svelte index 75280ade3..a4b5a1ec5 100644 --- a/src/lib/components/chat/Settings/Audio.svelte +++ b/src/lib/components/chat/Settings/Audio.svelte @@ -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 } }