mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
refac
This commit is contained in:
parent
6c862b8fbf
commit
f8ad74fc42
1 changed files with 10 additions and 7 deletions
|
|
@ -1285,14 +1285,17 @@
|
||||||
|
|
||||||
stream = null;
|
stream = null;
|
||||||
|
|
||||||
if (!$TTSWorker) {
|
if ($settings.audio?.tts?.engine === 'browser-kokoro') {
|
||||||
await TTSWorker.set(
|
// If the user has not initialized the TTS worker, initialize it
|
||||||
new KokoroWorker({
|
if (!$TTSWorker) {
|
||||||
dtype: $settings.audio?.tts?.engineConfig?.dtype ?? 'fp32'
|
await TTSWorker.set(
|
||||||
})
|
new KokoroWorker({
|
||||||
);
|
dtype: $settings.audio?.tts?.engineConfig?.dtype ?? 'fp32'
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
await $TTSWorker.init();
|
await $TTSWorker.init();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showCallOverlay.set(true);
|
showCallOverlay.set(true);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue