This commit is contained in:
Timothy Jaeryang Baek 2025-02-23 13:32:19 -08:00
parent 6c862b8fbf
commit f8ad74fc42

View File

@ -1285,14 +1285,17 @@
stream = null;
if (!$TTSWorker) {
await TTSWorker.set(
new KokoroWorker({
dtype: $settings.audio?.tts?.engineConfig?.dtype ?? 'fp32'
})
);
if ($settings.audio?.tts?.engine === 'browser-kokoro') {
// If the user has not initialized the TTS worker, initialize it
if (!$TTSWorker) {
await TTSWorker.set(
new KokoroWorker({
dtype: $settings.audio?.tts?.engineConfig?.dtype ?? 'fp32'
})
);
await $TTSWorker.init();
await $TTSWorker.init();
}
}
showCallOverlay.set(true);