STT icon indicating copy to clipboard operation
STT copied to clipboard

Feature request: Support running WASM in web worker

Open johns10 opened this issue 1 year ago • 1 comments

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 avatar Sep 04 '22 19:09 johns10

Checkout https://github.com/coqui-ai/STT-examples/tree/r1.0/wasm

wasertech avatar Sep 23 '22 13:09 wasertech