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

Feature request: Support running WASM in web worker #2293

Open
johns10 opened this issue Sep 4, 2022 · 1 comment
Open

Feature request: Support running WASM in web worker #2293

johns10 opened this issue Sep 4, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@johns10
Copy link

johns10 commented Sep 4, 2022

Is your feature request related to a problem? Please describe.
If you would like to use the wasm client, and want to instantiate STT, it involves downloading or loading multiple 100+ mb files. If you do it in the main thread, it locks up the UI. I don't believe this package currently supports running in a web worker, because the web context will attempt to create the URL of the .wasm/.worker file using the URL module, which isn't available in web workers.

Describe the solution you'd like
Allow passing in the url to the STT() function, overriding calls to the URL module.

Describe alternatives you've considered
Personally, I've hacked stt_wasm.js to take a url arg, and removed the calls to URL.
One could potentially provide an implementation of URL for use in stt_wasm? I'm not so deep in javascript that I know how to do it.

@johns10 johns10 added the enhancement New feature or request label Sep 4, 2022
@wasertech
Copy link
Collaborator

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

No branches or pull requests

2 participants