@todoforai/voiceloop 0.1.18 → 0.1.19
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/package.json +1 -1
- package/src/voice-agent.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@todoforai/voiceloop",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Fast, interruptible browser voice agent: VAD → STT → LLM → TTS with real barge-in, echo filtering, streaming first-sentence TTS and tap-to-seek. Zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
package/src/voice-agent.js
CHANGED
|
@@ -1963,7 +1963,9 @@ const CDN_PIPER_WASM = `${CDN}@diffusionstudio/piper-wasm@1.0.0/build/piper_phon
|
|
|
1963
1963
|
const ORT_SPECIFIER = 'onnxruntime-web';
|
|
1964
1964
|
// Dynamic import by URL, hidden from bundlers: Hermes (React Native) rejects `import(expr)` at
|
|
1965
1965
|
// bytecode compile time, so the syntax can't appear in this file even on paths RN never takes.
|
|
1966
|
-
|
|
1966
|
+
// Hermes's runtime parser rejects it too, so the Function is built LAZILY — a top-level
|
|
1967
|
+
// `new Function(...)` would throw at module load and take the whole import down with it.
|
|
1968
|
+
const importUrl = (u) => new Function('u', 'return import(u)')(u);
|
|
1967
1969
|
|
|
1968
1970
|
// OPFS blob cache — same 'piper' directory and url-basename filenames as the lib's own cache, so
|
|
1969
1971
|
// models already downloaded through the lib are reused (and vice versa).
|