@scotteza/opencode-spoken-replies 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/voice-helper-process.js +12 -1
- package/package.json +1 -1
|
@@ -84,7 +84,18 @@ async function prepareOnnxRuntime() {
|
|
|
84
84
|
ort.env.logLevel = "error";
|
|
85
85
|
}
|
|
86
86
|
async function loadKokoroModule() {
|
|
87
|
-
|
|
87
|
+
const runtimeSymbol = Symbol.for("onnxruntime");
|
|
88
|
+
const runtimeHost = globalThis;
|
|
89
|
+
const hadRuntimeOverride = runtimeSymbol in runtimeHost;
|
|
90
|
+
const runtimeOverride = runtimeHost[runtimeSymbol];
|
|
91
|
+
if (hadRuntimeOverride)
|
|
92
|
+
delete runtimeHost[runtimeSymbol];
|
|
93
|
+
try {
|
|
94
|
+
return await import("kokoro-js");
|
|
95
|
+
} finally {
|
|
96
|
+
if (hadRuntimeOverride)
|
|
97
|
+
runtimeHost[runtimeSymbol] = runtimeOverride;
|
|
98
|
+
}
|
|
88
99
|
}
|
|
89
100
|
|
|
90
101
|
class KokoroRuntime {
|