xenova / whisper-web

ML-powered speech recognition directly in your browser

Home Page:https://hf.co/spaces/Xenova/whisper-web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Development in firefox instruction

PushpenderSaini0 opened this issue · comments

I was having trouble running this in dev mode in firefox.
Loading worker.js will fail with SyntaxError: import declarations may only appear at top level of a module

This is because firefox does not support worker modules by default

Fix / Workaround

If you wish to run this in dev mode in firefox
you will have to enable it manually via about:config and set dom.workers.modules.enabled to true

This was added in firefox111 if you have older version this may not work

Add this in README.md for people using firefox.
You can assign it to me, and I can raise a PR.

Just to clarify, you mean you are unable to run the dev server (using npm run dev)? I have tested the demo app in Firefox and it does seem to work.

Is this perhaps a known issue with vite's development mode?

Edit: Re-reading your issue, are you referring to "Firefox Developer Edition"?

Yes , you won't be able to run the app in firefox when using the command npm run dev but it will run fine once it's build.

No i am not referring to "Firefox Developer Edition"

Okay I see, thanks for pointing that out! I just tested and you're right. 👍 Please feel free to make a PR with the note under step 2.