diff --git a/package.json b/package.json index d8caa5f6..4b320e4f 100644 --- a/package.json +++ b/package.json @@ -148,6 +148,7 @@ }, "packageManager": "yarn@4.7.0", "dependencies": { - "@ricky0123/vad-web": "^0.0.30" + "@ricky0123/vad-web": "^0.0.30", + "onnxruntime-web": "1.18.0" } } diff --git a/src/livekit/SileroVADGate.ts b/src/livekit/SileroVADGate.ts index 2fd7cae9..bfcbd15b 100644 --- a/src/livekit/SileroVADGate.ts +++ b/src/livekit/SileroVADGate.ts @@ -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]"); diff --git a/vite.config.ts b/vite.config.ts index 19e4a04b..dadeceb1 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -50,10 +50,6 @@ export default ({ src: "node_modules/onnxruntime-web/dist/*.wasm", dest: "vad", }, - { - src: "node_modules/onnxruntime-web/dist/ort-wasm-simd-threaded.mjs", - dest: "vad", - }, ], }), react(), diff --git a/yarn.lock b/yarn.lock index e92d3172..76fa551f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8450,6 +8450,7 @@ __metadata: node-stdlib-browser: "npm:^1.3.1" normalize.css: "npm:^8.0.1" observable-hooks: "npm:^4.2.3" + onnxruntime-web: "npm:1.18.0" pako: "npm:^2.0.4" postcss: "npm:^8.4.41" postcss-preset-env: "npm:^10.0.0" @@ -9635,6 +9636,13 @@ __metadata: languageName: node linkType: hard +"flatbuffers@npm:^1.12.0": + version: 1.12.0 + resolution: "flatbuffers@npm:1.12.0" + checksum: 10c0/14f9fb55f3063b389fc4e3d67ee8ffc71e351b478369fdae919701e458fc7766f2fea4f51181d6e73b4930fbc018cb7013558930367811b960cff01f23aae618 + languageName: node + linkType: hard + "flatbuffers@npm:^25.1.24": version: 25.9.23 resolution: "flatbuffers@npm:25.9.23" @@ -12046,6 +12054,13 @@ __metadata: languageName: node linkType: hard +"onnxruntime-common@npm:1.18.0": + version: 1.18.0 + resolution: "onnxruntime-common@npm:1.18.0" + checksum: 10c0/dc5caab4c5b95b4255ba3dcd5ea3e04e10a3a8c605d60c53dac25facfbe9d59a60c510b8ffc3e5f1c8816fded479b6f946b7840a0d10cbd32914ef8ce81c7218 + languageName: node + linkType: hard + "onnxruntime-common@npm:1.24.3": version: 1.24.3 resolution: "onnxruntime-common@npm:1.24.3" @@ -12053,6 +12068,20 @@ __metadata: languageName: node linkType: hard +"onnxruntime-web@npm:1.18.0": + version: 1.18.0 + resolution: "onnxruntime-web@npm:1.18.0" + dependencies: + flatbuffers: "npm:^1.12.0" + guid-typescript: "npm:^1.0.9" + long: "npm:^5.2.3" + onnxruntime-common: "npm:1.18.0" + platform: "npm:^1.3.6" + protobufjs: "npm:^7.2.4" + checksum: 10c0/90d9eed3e8d8bcfea61858eee2a1b94c680c67f6265bb5924752ae1bd9db93cb2dd8bc562ffba6b048fc32c721fcc30fd0b0669da5607fc6c41eaecaba3d4bd7 + languageName: node + linkType: hard + "onnxruntime-web@npm:^1.17.0": version: 1.24.3 resolution: "onnxruntime-web@npm:1.24.3"