mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-04-24 11:18:58 +02:00
* 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 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
emscripten.cpp | ||
index-tmpl.html | ||
README.md |
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/