mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-01-01 02:06:41 +00:00
794b162a46
* whisper : add integer quantization support * examples : add common-ggml + prepare to add "quantize" tool * whisper : quantization tool ready * whisper : fix F32 support * whisper : try to fix shared lib linkage * wasm : update quantized models to Q5 * bench.wasm : remove "medium" button * bench.wasm : fix custom model button * ggml : add Q5_0 and Q5_1 WASM SIMD * wasm : add quantized models to all WASM examples * wasm : bump DB version number to 2 * talk-llama : update example to latest llama.cpp * node : increase test timeout to 10s * readme : add information for model quantization * wasm : add links to other examples
24 lines
619 B
JavaScript
24 lines
619 B
JavaScript
const path = require("path");
|
|
const { whisper } = require(path.join(
|
|
__dirname,
|
|
"../../../build/Release/whisper-addon"
|
|
));
|
|
const { promisify } = require("util");
|
|
|
|
const whisperAsync = promisify(whisper);
|
|
|
|
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", async () => {
|
|
let result = await whisperAsync(whisperParamsMock);
|
|
|
|
expect(result.length).toBeGreaterThan(0);
|
|
}, 10000);
|
|
});
|
|
|