fix kws for WebAssembly (#999)

This commit is contained in:
Fangjun Kuang
2024-06-14 10:22:56 +08:00
committed by GitHub
parent 155f22d511
commit c214d8fb74
3 changed files with 30 additions and 6 deletions

View File

@@ -106,9 +106,9 @@ if (navigator.mediaDevices.getUserMedia) {
let result = recognizer.getResult(recognizer_stream);
console.log(result)
if (result.keyword.length > 0) {
console.log(result)
lastResult = result;
resultList.push(JSON.stringify(result));
}
@@ -287,4 +287,4 @@ function downsampleBuffer(buffer, exportSampleRate) {
offsetBuffer = nextOffsetBuffer;
}
return result;
};
};