mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-28 06:22:33 +00:00
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
This commit is contained in:
parent
8852d460b7
commit
ea615c3a2e
1 changed files with 2 additions and 0 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue