ricky0123 / vad

Voice activity detector (VAD) for the browser with a simple API
https://www.vad.ricky0123.com
Other
900 stars 143 forks source link

Angular Issue #158

Open greglose opened 3 days ago

greglose commented 3 days ago

Adding the vad-web to an angular 18 app. When launching I see the following error 👍 ./node_modules/onnxruntime-web/dist/ort.min.js:20:37-44 - Warning: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

using import { MicVAD } from '@ricky0123/vad-web'; to add it to my component.

Any work arounds?

TIA

vladP123ggg commented 7 hours ago

hello, try this whe initializing the app: const myvad = await MicVAD.new({ ortConfig: (ort) => { ort.env.wasm.wasmPaths = 'https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.0/dist/'; }, .... rest of the code I am using this library in angular for some time, if you have any issues drop a line.