We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7f29910 + dbd4ce3 commit 3d6c69dCopy full SHA for 3d6c69d
speech-to-text/webaudio-l16-stream.js
@@ -114,7 +114,7 @@ WebAudioL16Stream.prototype.downsample = function downsample(bufferNewSamples) {
114
var nOutputSamples = Math.floor((buffer.length - filter.length) / samplingRateRatio) + 1;
115
var outputBuffer = new Float32Array(nOutputSamples);
116
117
- for (i = 0; i + filter.length - 1 < buffer.length; i++) {
+ for (i = 0; i < outputBuffer.length; i++) {
118
offset = Math.round(samplingRateRatio * i);
119
var sample = 0;
120
for (var j = 0; j < filter.length; ++j) {
0 commit comments