Fixed kokoro loading process.

This commit is contained in:
2025-04-07 06:51:45 +00:00
parent 0842cbfefc
commit b1387f4833
13 changed files with 905 additions and 789 deletions
+2 -2
View File
@@ -95,8 +95,8 @@
// Initialize the model
const model_id = "onnx-community/Kokoro-82M-v1.0-ONNX";
this.instance = await this.kokoroTTS.from_pretrained(model_id, {
dtype: "q8", // Use quantized model for better performance
device: "webgpu", // Use WebGL for better performance
dtype: "q8",
device: "webgpu",
progress_callback: (progress) => {
// Skip progress updates if progress is NaN/undefined (cache loading)
if (progress === undefined || isNaN(progress)) {