File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -7760,7 +7760,13 @@ WebAudioL16Stream.prototype.downsample = function downsample(bufferNewSamples) {
7760
7760
buffer = bufferNewSamples ;
7761
7761
}
7762
7762
7763
- // downsampling variables
7763
+ // Downsampling and low-pass filter:
7764
+ // Input audio is typically 48kHz, this downsamples it to 16kHz.
7765
+ // It uses a FIR (finite impulse response) Filter to remove (or, at least attinuate)
7766
+ // audio frequencies > ~8kHz because sampled audio cannot accurately represent
7767
+ // frequiencies greater than half of the sample rate.
7768
+ // (Human voice tops out at < 4kHz, so nothing important is lost for transcription.)
7769
+ // See http://dsp.stackexchange.com/a/37475/26392 for a good explination of this code.
7764
7770
var filter = [
7765
7771
- 0.037935 ,
7766
7772
- 0.00089024 ,
You can’t perform that action at this time.
0 commit comments