whisper.cpp/examples/bench.wasm
Jhen-Jie Hong 0463028bc2
whisper : add context param to disable gpu (#1293)
* whisper : check state->ctx_metal not null

* whisper : add whisper_context_params { use_gpu }

* whisper : new API with params & deprecate old API

* examples : use no-gpu param && whisper_init_from_file_with_params

* whisper.objc : enable metal & disable on simulator

* whisper.swiftui, metal : enable metal & support load default.metallib

* whisper.android : use new API

* bindings : use new API

* addon.node : fix build & test

* bindings : updata java binding

* bindings : add missing whisper_context_default_params_by_ref WHISPER_API for java

* metal : use SWIFTPM_MODULE_BUNDLE for GGML_SWIFT and reuse library load

* metal : move bundle var into block

* metal : use SWIFT_PACKAGE instead of GGML_SWIFT

* style : minor updates

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
2023-11-06 11:04:24 +02:00
..
CMakeLists.txt whisper : add integer quantization support (#540) 2023-04-30 18:51:57 +03:00
emscripten.cpp whisper : add context param to disable gpu (#1293) 2023-11-06 11:04:24 +02:00
index-tmpl.html whisper : add integer quantization support (#540) 2023-04-30 18:51:57 +03:00
README.md bench.wasm : same as "bench" but runs in the browser (#89) 2022-12-11 11:09:10 +02: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

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