mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-22 14:02:21 +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>
16 lines
484 B
JavaScript
16 lines
484 B
JavaScript
const path = require('path');
|
|
const { whisper } = require(path.join(__dirname, '../../../build/Release/whisper-addon'));
|
|
|
|
const whisperParamsMock = {
|
|
language: 'en',
|
|
model: path.join(__dirname, '../../../models/ggml-base.en.bin'),
|
|
fname_inp: path.join(__dirname, '../../../samples/jfk.wav'),
|
|
};
|
|
|
|
describe("Run whisper.node", () => {
|
|
|
|
test("it should receive a non-empty value", () => {
|
|
expect(whisper(whisperParamsMock).length).toBeGreaterThan(0);
|
|
});
|
|
});
|