stt-whisper.cpp-cpu-api-py/whisper.cpp-1.5.2/examples/addon.node
Kar 4d20931ecc init 2025-06-17 15:53:01 +05:30
..
__test__ init 2025-06-17 15:53:01 +05:30
.gitignore init 2025-06-17 15:53:01 +05:30
CMakeLists.txt init 2025-06-17 15:53:01 +05:30
README.md init 2025-06-17 15:53:01 +05:30
addon.cpp init 2025-06-17 15:53:01 +05:30
index.js init 2025-06-17 15:53:01 +05:30
package.json init 2025-06-17 15:53:01 +05:30

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.