Skip to content

Commit

Permalink
fix: 转换后的文件有噪声
Browse files Browse the repository at this point in the history
  • Loading branch information
mingzhi22 committed Sep 17, 2018
1 parent 6b8f2ba commit dbd4ce3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion speech-to-text/webaudio-l16-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ WebAudioL16Stream.prototype.downsample = function downsample(bufferNewSamples) {
var nOutputSamples = Math.floor((buffer.length - filter.length) / samplingRateRatio) + 1;
var outputBuffer = new Float32Array(nOutputSamples);

for (i = 0; i + filter.length - 1 < buffer.length; i++) {
for (i = 0; i < outputBuffer.length; i++) {
offset = Math.round(samplingRateRatio * i);
var sample = 0;
for (var j = 0; j < filter.length; ++j) {
Expand Down

0 comments on commit dbd4ce3

Please sign in to comment.