mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-19 04:37:51 +00:00
ab1916fc59
* addon: implement node addon call whisper through cpp * addon: modify the license to MIT * addon: remove iostream * addon: rename dir * addon: fix typo * addon: configure cmake to build when cmake-js is used * ci: add addon.node test ci * addon: remove build WHISPER_BUILD_TESTS * addon: update build command * addon: add test * addon: add test file * addon: adapt to compile on Windows * addon: fix typo * addon: reuse jfk.wav Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> * addon: reuse jfk.wav --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
1001 B
1001 B
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.