fix: downgrade onnxruntime-web to 1.18 for non-threaded SIMD WASM

ort 1.19+ dropped non-threaded WASM binaries and replaced them with a
threaded .mjs loader that Vite's dev server fails to serve correctly
(wrong MIME type / transform interception). ort 1.18 ships ort-wasm-simd.wasm
which works with numThreads=1 and needs no .mjs dynamic import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mk
2026-03-23 23:45:05 -03:00
parent b25cec3aa0
commit f2988cd689
4 changed files with 33 additions and 7 deletions

View File

@@ -6,8 +6,8 @@ Please see LICENSE in the repository root for full details.
*/
import { MicVAD, getDefaultRealTimeVADOptions } from "@ricky0123/vad-web";
// ort is not re-exported from the index, import from submodule
import { ort } from "@ricky0123/vad-web/dist/real-time-vad";
// ort is not re-exported from the vad-web index; import from the submodule
import { ort } from "@ricky0123/vad-web/dist/real-time-vad.js";
import { logger } from "matrix-js-sdk/lib/logger";
const log = logger.getChild("[SileroVADGate]");