fix: tts playback

This commit is contained in:
Timothy J. Baek 2024-02-09 16:37:21 -08:00
parent 5eff0e5f61
commit 40d8605fea
4 changed files with 7 additions and 1 deletions

View file

@ -62,7 +62,6 @@
let settings = JSON.parse(localStorage.getItem('settings') ?? '{}'); let settings = JSON.parse(localStorage.getItem('settings') ?? '{}');
titleAutoGenerate = settings.titleAutoGenerate ?? true; titleAutoGenerate = settings.titleAutoGenerate ?? true;
speechAutoSend = settings.speechAutoSend ?? false;
responseAutoCopy = settings.responseAutoCopy ?? false; responseAutoCopy = settings.responseAutoCopy ?? false;
showUsername = settings.showUsername ?? false; showUsername = settings.showUsername ?? false;
titleAutoGenerateModel = settings.titleAutoGenerateModel ?? ''; titleAutoGenerateModel = settings.titleAutoGenerateModel ?? '';

View file

@ -50,6 +50,9 @@
onMount(async () => { onMount(async () => {
let settings = JSON.parse(localStorage.getItem('settings') ?? '{}'); let settings = JSON.parse(localStorage.getItem('settings') ?? '{}');
speechAutoSend = settings.speechAutoSend ?? false;
responseAutoPlayback = settings.responseAutoPlayback ?? false;
engine = settings?.speech?.engine ?? ''; engine = settings?.speech?.engine ?? '';
speaker = settings?.speech?.speaker ?? ''; speaker = settings?.speech?.speaker ?? '';

View file

@ -450,6 +450,7 @@
} }
if ($settings.responseAutoPlayback) { if ($settings.responseAutoPlayback) {
await tick();
document.getElementById(`speak-button-${responseMessage.id}`)?.click(); document.getElementById(`speak-button-${responseMessage.id}`)?.click();
} }
} }
@ -638,6 +639,7 @@
} }
if ($settings.responseAutoPlayback) { if ($settings.responseAutoPlayback) {
await tick();
document.getElementById(`speak-button-${responseMessage.id}`)?.click(); document.getElementById(`speak-button-${responseMessage.id}`)?.click();
} }

View file

@ -464,6 +464,7 @@
} }
if ($settings.responseAutoPlayback) { if ($settings.responseAutoPlayback) {
await tick();
document.getElementById(`speak-button-${responseMessage.id}`)?.click(); document.getElementById(`speak-button-${responseMessage.id}`)?.click();
} }
} }
@ -652,6 +653,7 @@
} }
if ($settings.responseAutoPlayback) { if ($settings.responseAutoPlayback) {
await tick();
document.getElementById(`speak-button-${responseMessage.id}`)?.click(); document.getElementById(`speak-button-${responseMessage.id}`)?.click();
} }