Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to initialize onnx model in chrome extension #149

Open
MilanHofmann opened this issue Oct 31, 2024 · 0 comments
Open

Unable to initialize onnx model in chrome extension #149

MilanHofmann opened this issue Oct 31, 2024 · 0 comments

Comments

@MilanHofmann
Copy link

I am using vite + vue3 + this vad package Version 0.0.19.

In vite dev server everything works well, but when actually building and loading the extension I get the following error during the MicVAD initialization:

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 further:

`
falling back to ArrayBuffer instantiation
(anonymous) @ ort-wasm-simd-threaded.mjs:22

ort-wasm-simd-threaded.mjs:21 failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): 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'"
(anonymous) @ ort-wasm-simd-threaded.mjs:21

ort-wasm-simd-threaded.mjs:20 Aborted(CompileError: WebAssembly.instantiate(): 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'")
`

There are many users who have successfully used this package in chrome extension like https://github.com/Pedal-Intelligence/saypi-userscript so I would be super grateful for any hint how to initialize the Model correctly for Manifest v3 Chrome extensions or where this problem could possibly stem from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant