Closed asasas234 closed 5 months ago
I tried to execute in the background and set ort.env.wasm.numThreads = 1, which resolved the above error. However, encountered a new error.
ort.min.js:1806 Uncaught (in promise) Error: Can't create a session. ERROR_CODE: 7, ERROR_MESSAGE: Failed to load model because protobuf parsing failed
I have solved this problem myself, the modelURL originally needs to be configured with the path of the silero_vad.onnx
file
@asasas234 would you share how you setup the static files and loading logic in the end? I am running into:
ort-wasm-simd-threaded.mjs:22 wasm streaming compile failed: CompileError: WebAssembly.instantiateStreaming(): Refused to compile or instantiate WebAssembly module because neither 'wasm-eval' nor 'unsafe-eval' is an allowed source of script in the following Content Security Policy directive: "script-src 'self'"
And I am not sure where this stems from. I am using vite + vue and running the app in dev works fine. Is there a specific file for chrome extension that does not use 'wasm-eval' etc.?
I am trying to load the plugin code in the Chrome extension as follows:
Through debugging, I found that I have successfully obtained the ArrayBuffer of the wasm file, but an error is reported when executing the following code:Error: no available backend found. ERR: [wasm] RuntimeError: Aborted(both async and sync fetching of the wasm failed). Build with -sASSERTIONS for more info., [cpu] Error: previous call to 'initWasm()' failed.
How to solve it?