Closed jakespracher closed 5 months ago
Did other browsers have the same issue? I've never tested this on Safari, so I will try to reproduce it and see what can we do from there. Do you have the whole stacktrace?
I couldn't reproduce this on Chrome, Edge, or Firefox, maybe this is a Safari issue?
Same on Chrome. I'm running the examples with python -m http.server 8080
then going to localhost:8080/examples/fromMic.html
I think, per this, that we just need to send the correct headers from the server.
Yeah, this maybe a coep/coop issue
Ah interesting, adding those two headers makes the original error log go away and adds two more that are CSP related
[Error] Refused to load blob:http://localhost:4000/59684ac0-cdde-4534-9394-9499838d5deb because it does not appear in the worker-src directive of the Content Security Policy.
[Error] Unhandled Promise Rejection: SecurityError: The operation is insecure.
(anonymous function) (app.js:9510)
You may have a strict CSP for default-src or child-src (Safari and some other) or worker-src that disallow blobs. Try setting worker-src to blob. Let me know if it works for you!
I think we can close this one out due to the header requirements for SharedArrayBuffer and general CSP issues, though not sure if it'd be worth adding documentation about this. That said, it's still not working 😅 may open a separate issue.
Does it work on other browsers? Let's just keep this issue here. Not gonna lie, I didn't really think about Safari while doing this. 😅
if it'd be worth adding documentation about this.
Some docs on CSP settings would be nice, but we have to make yours work to confirm it. We already have docs for the response headers
That said, it's still not working 😅 may open a separate issue.
worker-src set to blob still doesn't work?
@cellis mentioned he encountered this on Chrome, it doesn't seem safari specific. Once I get the state of my local cleaned up I can revert the fix and try. I think worker-src blob does work but for now I've disabled my CSP and am still working around the failed to fetch issue in #1
Can you review the proposal for fixing I have in #1?
Safari Version 17.3.1 (19617.2.4.11.12)
Happens after clicking start and speaking via the example
Thanks for the lib, still failing to get browser offline speech recognition working with any example from any offering 🙃