whisper.cpp icon indicating copy to clipboard operation
whisper.cpp copied to clipboard

WASM: Uncaught TypeError: e.data.handlers is not iterable

Open eschmidbauer opened this issue 1 year ago • 13 comments

Hi- im trying to get WASM running on my local machine using the latest code (e70e5c8b53faec6abbf0170f1e9a195f4dfccaab) but when i load the page in my browser, i see this issue in web console:

worker sent an error! http://localhost:8081/libwhisper.worker.js:1

Attached is a screenshot, image

Im running a stock nginx config with this server setting:

server {
    listen       8081;
    server_name  _;
    root /opt/whisper.cpp_wasm;
    location / {
        index index.html index.htm;
        add_header 'Cross-Origin-Embedder-Policy' 'require-corp';
        add_header 'Cross-Origin-Opener-Policy' 'same-origin';	 
    }
  }

Strangely, i can load a model and audio file but when i press the transcribe button i see this error:

Uncaught TypeError: Module.init is not a function
    at onProcess ((index):449:39)
    at HTMLButtonElement.onclick ((index):157:61)
onProcess @ (index):449
onclick @ (index):157

Screen Shot 2022-11-17 at 10 39 15 AM

eschmidbauer avatar Nov 17 '22 15:11 eschmidbauer