I tried to follow the instruction in the README provided here: https://github.com/ggml-org/whisper.cpp/tree/master/examples/stream.wasm
In order to make it work on on M1 Mac, I initially installed these two packages:
brew install cmake
brew install emscripten
And then as per the other instructions, I successfully followed these steps:
mkdir build-em && cd build-em
emcmake cmake ..
make -j
python3 examples/server.py
But when I open the page: http://localhost:8000/stream.wasm, I get this error
failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): section was shorter than expected size (87618 bytes expected, 684 decoded) @+696
Aborted(CompileError: WebAssembly.instantiate(): section was shorter than expected size (87618 bytes expected, 684 decoded) @+696)
as you can see in the screenshot:

Here's the console logs:
```
stream.wasm/:27
GET http://localhost:8000/coi-serviceworker.js net::ERR_CONNECTION_REFUSED
helpers.js:14 failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): section was shorter than expected size (87618 bytes expected, 684 decoded) @+696
helpers.js:14 Aborted(CompileError: WebAssembly.instantiate(): section was shorter than expected size (87618 bytes expected, 684 decoded) @+696)
stream.js:1 Uncaught (in promise) RuntimeError: Aborted(CompileError: WebAssembly.instantiate(): section was shorter than expected size (87618 bytes expected, 684 decoded) @+696). Build with -sASSERTIONS for more info.
at abort (stream.js:1:6122)
at instantiateArrayBuffer (stream.js:1:1359798)
at async createWasm (stream.js:1:1360753)
abort @ stream.js:1
instantiateArrayBuffer @ stream.js:1
await in instantiateArrayBuffer
instantiateAsync @ stream.js:1
createWasm @ stream.js:1
(anonymous) @ stream.js:1
```
Where did I mess up?
I tried to follow the instruction in the README provided here: https://github.com/ggml-org/whisper.cpp/tree/master/examples/stream.wasm
In order to make it work on on M1 Mac, I initially installed these two packages:
And then as per the other instructions, I successfully followed these steps:
But when I open the page:
http://localhost:8000/stream.wasm, I get this erroras you can see in the screenshot:
Where did I mess up?