run: npm install
- name: Compile addon.node
- run: npx cmake-js compile -T whisper-addon -B Release
+ run: npx cmake-js compile -T addon.node -B Release
- name: Download test model
run: |
-set(TARGET whisper-addon)
+set(TARGET addon.node)
# Base settings
#==================================================================
Make sure it is in the project root directory and compiled with make-js.
```shell
-npx cmake-js compile -T whisper-addon -B Release
+npx cmake-js compile -T addon.node -B Release
```
For Electron addon and cmake-js options, you can see [cmake-js](https://github.com/cmake-js/cmake-js) and make very few configuration changes.
> Such as appointing special cmake path:
> ```shell
-> npx cmake-js compile -c 'xxx/cmake' -T whisper-addon -B Release
+> npx cmake-js compile -c 'xxx/cmake' -T addon.node -B Release
> ```
## Run
const path = require("path");
const { whisper } = require(path.join(
__dirname,
- "../../../build/Release/whisper-addon"
+ "../../../build/Release/addon.node"
));
const { promisify } = require("util");
model: path.join(__dirname, "../../../models/ggml-base.en.bin"),
fname_inp: path.join(__dirname, "../../../samples/jfk.wav"),
use_gpu: true,
+ no_timestamps: false,
};
describe("Run whisper.node", () => {
const path = require("path");
const { whisper } = require(path.join(
__dirname,
- "../../build/Release/whisper-addon"
+ "../../build/Release/addon.node"
));
const { promisify } = require("util");
model: path.join(__dirname, "../../models/ggml-base.en.bin"),
fname_inp: "../../samples/jfk.wav",
use_gpu: true,
+ no_timestamps: false,
};
const arguments = process.argv.slice(2);
{
- "name": "whisper-addon",
+ "name": "addon.node",
"version": "0.0.0",
"description": "",
"main": "index.js",