Closed mydigitalself closed 7 years ago
Take a look at mic/lib/silenceTransform.js
<snip>
for(i=0; i<chunk.length; i=i+2) {
if(chunk[i+1] > 128) {
speechSample = (chunk[i+1] - 256) * 256;
} else {
speechSample = chunk[i+1] * 256;
}
speechSample += chunk[i];
if(Math.abs(speechSample) > 2000) {
if (debug) {
console.log("Found speech block");
}
resetConsecSilence();
break;
} else {
silenceLength++;
}
}
<snip>
Hi there, thanks for the module. I had a question and forgive my naivety on how this whole thing works and not overly familiar with streams. How can I get access to the data so I can process it as a series of amplitudes?