mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
refac
This commit is contained in:
@@ -205,7 +205,7 @@
|
||||
|
||||
if (_responses.at(0)) {
|
||||
const content = _responses[0];
|
||||
if (content) {
|
||||
if ((content ?? '').trim() !== '') {
|
||||
assistantSpeakingHandler(content);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,6 +211,7 @@
|
||||
speaking = null;
|
||||
speakingIdx = null;
|
||||
} else {
|
||||
if ((message?.content ?? '').trim() !== '') {
|
||||
speaking = true;
|
||||
|
||||
if ($config.audio.tts.engine === 'openai') {
|
||||
@@ -274,7 +275,8 @@
|
||||
const voice =
|
||||
voices
|
||||
?.filter(
|
||||
(v) => v.voiceURI === ($settings?.audio?.tts?.voice ?? $config?.audio?.tts?.voice)
|
||||
(v) =>
|
||||
v.voiceURI === ($settings?.audio?.tts?.voice ?? $config?.audio?.tts?.voice)
|
||||
)
|
||||
?.at(0) ?? undefined;
|
||||
|
||||
@@ -299,6 +301,9 @@
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
} else {
|
||||
toast.error('No content to speak');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user