Add VAD and keyword spotting for the Node package with WebAssembly (#1286)

This commit is contained in:
Fangjun Kuang
2024-08-24 23:05:54 +08:00
committed by GitHub
parent 537e163dd0
commit 5ed8e31868
40 changed files with 456 additions and 524 deletions

View File

@@ -42,11 +42,11 @@ stream.acceptWaveform({samples: tailPadding, sampleRate: wave.sampleRate});
const detectedKeywords = [];
while (kws.isReady(stream)) {
kws.decode(stream);
const keyword = kws.getResult(stream).keyword;
if (keyword != '') {
detectedKeywords.push(keyword);
}
kws.decode(stream);
}
let stop = Date.now();