mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-11-07 08:34:37 +01:00
794b162a46
* whisper : add integer quantization support * examples : add common-ggml + prepare to add "quantize" tool * whisper : quantization tool ready * whisper : fix F32 support * whisper : try to fix shared lib linkage * wasm : update quantized models to Q5 * bench.wasm : remove "medium" button * bench.wasm : fix custom model button * ggml : add Q5_0 and Q5_1 WASM SIMD * wasm : add quantized models to all WASM examples * wasm : bump DB version number to 2 * talk-llama : update example to latest llama.cpp * node : increase test timeout to 10s * readme : add information for model quantization * wasm : add links to other examples |
||
---|---|---|
.. | ||
__test__ | ||
.gitignore | ||
addon.cpp | ||
CMakeLists.txt | ||
index.js | ||
package.json | ||
README.md |
addon
This is an addon demo that can perform whisper model reasoning in node
and electron
environments, based on cmake-js.
It can be used as a reference for using the whisper.cpp project in other node projects.
Install
npm install
Compile
Make sure it is in the project root directory and compiled with make-js.
npx cmake-js compile -T whisper-addon -B Release
For Electron addon and cmake-js options, you can see cmake-js and make very few configuration changes.
Such as appointing special cmake path:
npx cmake-js compile -c 'xxx/cmake' -T whisper-addon -B Release
Run
cd examples/addon.node
node index.js --language='language' --model='model-path' --fname_inp='file-path'
Because this is a simple Demo, only the above parameters are set in the node environment.
Other parameters can also be specified in the node environment.