You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
whisper.cpp/examples/addon.node
sandrohanea 59fdcd19c8
whisper : add whisper_state + default state on the whisper_context (#523)
1 year ago
..
__test__ ci : add node addon test and optimize compilation configuration (#468) 1 year ago
.gitignore addon.node : using whisper as a Node.js addon (#443) 1 year ago
CMakeLists.txt examples : refactor in order to reuse code and reduce duplication (#482) 1 year ago
README.md ci : add node addon test and optimize compilation configuration (#468) 1 year ago
addon.cpp whisper : add whisper_state + default state on the whisper_context (#523) 1 year ago
index.js addon.node : using whisper as a Node.js addon (#443) 1 year ago
package.json ci : add node addon test and optimize compilation configuration (#468) 1 year ago

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.