Fixed option ui binidngs.

This commit is contained in:
2025-04-05 11:29:30 +00:00
parent b50f60e195
commit 115704f89d
6 changed files with 355 additions and 301 deletions
+5 -1
View File
@@ -250,11 +250,15 @@
window.KokoroLoader.instance.generate(data.text, { voice: data.voice, speed: data.speed })
.then(result => {
log(`Generation successful for request ${data.id}`, 'success');
// Convert the result to a proper format for the parent window
const audio = new Uint8Array(result.buffer);
window.parent.postMessage({
type: 'kokoro-generated',
id: data.id,
success: true,
result: result
result: { buffer: audio.buffer }
}, '*');
})
.catch(error => {