File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,13 @@ WebAudioL16Stream.prototype.downsample = function downsample(bufferNewSamples) {
78
78
buffer = bufferNewSamples ;
79
79
}
80
80
81
- // downsampling variables
81
+ // Downsampling and low-pass filter:
82
+ // Input audio is typically 48kHz, this downsamples it to 16kHz.
83
+ // It uses a FIR (finite impulse response) Filter to remove (or, at least attinuate)
84
+ // audio frequencies > ~8kHz because sampled audio cannot accurately represent
85
+ // frequiencies greater than half of the sample rate.
86
+ // (Human voice tops out at < 4kHz, so nothing important is lost for transcription.)
87
+ // See http://dsp.stackexchange.com/a/37475/26392 for a good explination of this code.
82
88
var filter = [
83
89
- 0.037935 ,
84
90
- 0.00089024 ,
You can’t perform that action at this time.
0 commit comments