From ea615c3a2e89d827e24016d719acb5ee63f409d2 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sat, 24 Oct 2026 08:04:46 +0200 Subject: [PATCH] fix: read aloud stops after the first failed sentence instead of requesting the rest (#33028) When one sentence failed to synthesize during Read Aloud, playback ended but every remaining sentence was still sent to the speech provider, each failure showed its own error toast and any audio that came back was thrown away. Read Aloud now requests no further sentences after the first failure, so a provider outage gives one error and no wasted requests. Fixes #33023 --- src/lib/components/chat/Messages/ResponseMessage.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/components/chat/Messages/ResponseMessage.svelte b/src/lib/components/chat/Messages/ResponseMessage.svelte index 9e1764f41b..6f6628bedb 100644 --- a/src/lib/components/chat/Messages/ResponseMessage.svelte +++ b/src/lib/components/chat/Messages/ResponseMessage.svelte @@ -334,6 +334,7 @@ for (const [, sentence] of messageContentParts.entries()) { if (signal.aborted) return; + if (!speaking) break; const url = await $TTSWorker .generate({ text: sentence, voice: voiceId }) @@ -354,6 +355,7 @@ } else { for (const [, sentence] of messageContentParts.entries()) { if (signal.aborted) return; + if (!speaking) break; const res = await synthesizeOpenAISpeech(localStorage.token, voiceId, sentence).catch( (error) => {