Timothy Jaeryang Baek 2 months ago
parent
commit
29c781875d
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/lib/workers/kokoro.worker.ts

+ 4 - 0
src/lib/workers/kokoro.worker.ts

@@ -1,5 +1,9 @@
+import { env } from '@huggingface/transformers';
 import { KokoroTTS } from 'kokoro-js';
 
+// TODO: Below doesn't work as expected, need to investigate further
+env.backends.onnx.wasm.wasmPaths = '/wasm/';
+
 let tts;
 let isInitialized = false; // Flag to track initialization status
 const DEFAULT_MODEL_ID = 'onnx-community/Kokoro-82M-v1.0-ONNX'; // Default model