mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-06-02 16:05:35 +02:00
This commit enable the node addon to suppress all output, even the result of the transcription if the no_prints parameter is set to true. The motivation for this is that for the node addon there is a fullfilment handler/success callback to process the transcription result. And it might be useful to be able to disable the printing of the transcription result to the console, so that the user can handle the result in their own way. Refs: https://github.com/ggml-org/whisper.cpp/issues/3176
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 addon.node -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 addon.node -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.