File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ var TARGET_SAMPLE_RATE = 16000;
7
7
/**
8
8
* Transforms Buffers or AudioBuffers into a binary stream of l16 (raw wav) audio, downsampling in the process.
9
9
*
10
- * The watson speech-to-text service works on 1600khz and internally downsamples audio received at higher samplerates.
11
- * WebAudio is usually 48000khz , so downsampling here reduces bandwidth usage by 2/3.
10
+ * The watson speech-to-text service works on 16kHz and internally downsamples audio received at higher samplerates.
11
+ * WebAudio is usually 44.1kHz or 48kHz , so downsampling here reduces bandwidth usage by ~ 2/3.
12
12
*
13
13
* Format event + stream can be combined with https://www.npmjs.com/package/wav to generate a wav file with a proper header
14
14
*
@@ -79,7 +79,7 @@ WebAudioL16Stream.prototype.downsample = function downsample(bufferNewSamples) {
79
79
}
80
80
81
81
// Downsampling and low-pass filter:
82
- // Input audio is typically 48kHz, this downsamples it to 16kHz.
82
+ // Input audio is typically 44.1kHz or 48kHz, this downsamples it to 16kHz.
83
83
// It uses a FIR (finite impulse response) Filter to remove (or, at least attinuate)
84
84
// audio frequencies > ~8kHz because sampled audio cannot accurately represent
85
85
// frequiencies greater than half of the sample rate.
You can’t perform that action at this time.
0 commit comments