mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-07 02:58:21 +00:00
fix: set up the Kokoro voice when Voice Mode opens, however it was opened (#31829)
This commit is contained in:
parent
015dbc8619
commit
51da3eefc9
1 changed files with 15 additions and 0 deletions
|
|
@ -744,6 +744,21 @@
|
|||
|
||||
model = $models.find((m) => m.id === modelId);
|
||||
|
||||
if ($settings.audio?.tts?.engine === 'browser-kokoro' && !$TTSWorker) {
|
||||
try {
|
||||
await TTSWorker.set(
|
||||
new KokoroWorker({
|
||||
dtype: $settings.audio?.tts?.engineConfig?.dtype ?? 'fp32'
|
||||
})
|
||||
);
|
||||
|
||||
await $TTSWorker.init();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
toast.error(`${error}`);
|
||||
}
|
||||
}
|
||||
|
||||
startRecording();
|
||||
|
||||
eventTarget.addEventListener('chat:start', chatStartHandler);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue