Skip to content

Commit b7f2790

Browse files
authored
fix input freqnency comments
1 parent 9aaa82a commit b7f2790

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

speech-to-text/webaudio-l16-stream.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ var TARGET_SAMPLE_RATE = 16000;
77
/**
88
* Transforms Buffers or AudioBuffers into a binary stream of l16 (raw wav) audio, downsampling in the process.
99
*
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.
1212
*
1313
* Format event + stream can be combined with https://www.npmjs.com/package/wav to generate a wav file with a proper header
1414
*
@@ -79,7 +79,7 @@ WebAudioL16Stream.prototype.downsample = function downsample(bufferNewSamples) {
7979
}
8080

8181
// 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.
8383
// It uses a FIR (finite impulse response) Filter to remove (or, at least attinuate)
8484
// audio frequencies > ~8kHz because sampled audio cannot accurately represent
8585
// frequiencies greater than half of the sample rate.

0 commit comments

Comments
 (0)