diff --git a/src/lib/components/chat/Settings/Interface.svelte b/src/lib/components/chat/Settings/Interface.svelte index 3d831d5e..45be9adb 100644 --- a/src/lib/components/chat/Settings/Interface.svelte +++ b/src/lib/components/chat/Settings/Interface.svelte @@ -62,7 +62,6 @@ let settings = JSON.parse(localStorage.getItem('settings') ?? '{}'); titleAutoGenerate = settings.titleAutoGenerate ?? true; - speechAutoSend = settings.speechAutoSend ?? false; responseAutoCopy = settings.responseAutoCopy ?? false; showUsername = settings.showUsername ?? false; titleAutoGenerateModel = settings.titleAutoGenerateModel ?? ''; diff --git a/src/lib/components/chat/Settings/Voice.svelte b/src/lib/components/chat/Settings/Voice.svelte index 2656626b..dc201069 100644 --- a/src/lib/components/chat/Settings/Voice.svelte +++ b/src/lib/components/chat/Settings/Voice.svelte @@ -50,6 +50,9 @@ onMount(async () => { let settings = JSON.parse(localStorage.getItem('settings') ?? '{}'); + speechAutoSend = settings.speechAutoSend ?? false; + responseAutoPlayback = settings.responseAutoPlayback ?? false; + engine = settings?.speech?.engine ?? ''; speaker = settings?.speech?.speaker ?? ''; diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index b213a5d4..a01e4d36 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -450,6 +450,7 @@ } if ($settings.responseAutoPlayback) { + await tick(); document.getElementById(`speak-button-${responseMessage.id}`)?.click(); } } @@ -638,6 +639,7 @@ } if ($settings.responseAutoPlayback) { + await tick(); document.getElementById(`speak-button-${responseMessage.id}`)?.click(); } diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 58fbc046..4ff1f3bd 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -464,6 +464,7 @@ } if ($settings.responseAutoPlayback) { + await tick(); document.getElementById(`speak-button-${responseMessage.id}`)?.click(); } } @@ -652,6 +653,7 @@ } if ($settings.responseAutoPlayback) { + await tick(); document.getElementById(`speak-button-${responseMessage.id}`)?.click(); }