Closed mreinstein closed 7 years ago
I didn't write that, someone on the Speech team did, and I just reused it from the original Speech to Text demo. It's part of downsampling the audio - you can't just drop or average samples because it won't sound right; it's the same idea as anti-aliasing jagged edges in game graphics.
To be honest, I don't fully understand the topic myself, but there's some good explanations of the idea here: http://dsp.stackexchange.com/questions/20303/trying-to-downsample-audio
Thanks for the description. I sent a PR incorporating your explanation. I think what you provide is much more valuable then what was there prior.
I'm looking at this:
https://github.com/watson-developer-cloud/speech-javascript-sdk/blob/master/speech-to-text/webaudio-l16-stream.js#L84
It appears that a filter of some kind is being applied to the audio stream. I'm curious what this is doing, any why. :)