whisper.cpp/examples/bench.wasm
Daniel Bevenius e17af6524f
ci : add github pages workflow for wasm examples (#2969)
* ci : add github pages workflow for wasm examples

This commit adds a github workflow to build and deploy the wasm examples
to github pages. The whisper.wasm example is deployed as the main page.

This workflow is trigged by a push to master and will deploy the
examples to: https://ggerganov.github.io/whisper.cpp/.

This requires that the repository has enabled github actions in
`Settings` -> `Pages` -> `Build and deployment` -> `Source` be set to
`GitHub Actions`.

One thing to note is that this commit removes the `talk` example as I'm
not sure how this example is built yet.

Refs: https://github.com/ggerganov/whisper.cpp/issues/2784
2025-03-31 11:34:40 +02:00
..
CMakeLists.txt whisper : add integer quantization support (#540) 2023-04-30 18:51:57 +03:00
emscripten.cpp whisper : add support for large v3 (#1444) 2023-11-07 15:30:18 +02:00
index-tmpl.html ci : add github pages workflow for wasm examples (#2969) 2025-03-31 11:34:40 +02:00
README.md examples : update wasm examples to include server.py [no ci] (#2908) 2025-03-20 09:07:43 +01:00

bench.wasm

Benchmark the performance of whisper.cpp in the browser using WebAssembly

Link: https://whisper.ggerganov.com/bench/

Terminal version: examples/bench

Build instructions

# build using Emscripten (v3.1.2)
git clone https://github.com/ggerganov/whisper.cpp
cd whisper.cpp
mkdir build-em && cd build-em
emcmake cmake ..
make -j

The example can then be started by running a local HTTP server:

python3 examples/server.py

And then opening a browser to the following URL: http://localhost:8000/bench.wasm

To run the example in a different server, you need to copy the following files to the server's HTTP path:

# copy the produced page to your HTTP path
cp bin/bench.wasm/*       /path/to/html/
cp bin/libbench.worker.js /path/to/html/