From 519733a8f1bceb60601745e52d11d25010ca4378 Mon Sep 17 00:00:00 2001 From: Albert Ho Date: Fri, 2 Feb 2024 12:58:08 -0800 Subject: [PATCH] fix --- demo/nodejs/file.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/nodejs/file.js b/demo/nodejs/file.js index 3a2feba..e9fd3f1 100755 --- a/demo/nodejs/file.js +++ b/demo/nodejs/file.js @@ -75,7 +75,7 @@ function fileDemo() { let frames = getInt16Frames(inputWaveFile, engineInstance.frameLength); - const printedNums = new Set(); + const printedNumbers = new Set(); for (let i = 0; i < frames.length; i++) { const result = engineInstance.process(frames[i]); const timestamp = ( @@ -83,9 +83,9 @@ function fileDemo() { engineInstance.sampleRate ).toFixed(1); - if (result >= threshold && !printedNums.has(timestamp)) { + if (result >= threshold && !printedNumbers.has(timestamp)) { console.log(`Detected voice activity at ${timestamp} sec`); - printedNums.add(timestamp); + printedNumbers.add(timestamp); } }