mirror of
https://github.com/open-webui/open-webui
synced 2024-11-25 13:29:53 +00:00
fix: loop until voice list available
This commit is contained in:
parent
9101c174d8
commit
3b7f7c6e32
@ -618,7 +618,17 @@
|
||||
gravatarEmail = settings.gravatarEmail ?? '';
|
||||
|
||||
speakVoice = settings.speakVoice ?? '';
|
||||
await voices.set(await speechSynthesis.getVoices());
|
||||
// await voices.set(await speechSynthesis.getVoices());
|
||||
|
||||
const getVoicesLoop = setInterval(async () => {
|
||||
const _voices = await speechSynthesis.getVoices();
|
||||
await voices.set(_voices);
|
||||
|
||||
// do your loop
|
||||
if (_voices.length > 0) {
|
||||
clearInterval(getVoicesLoop);
|
||||
}
|
||||
}, 100);
|
||||
|
||||
saveChatHistory = settings.saveChatHistory ?? true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user