I built a phase vocoder in JavaScript based on this paper. It works great, except for a crackling artifact that is present in the rebuilt signal.
I recorded this clip if you want to hear what it sounds like
Here’s somethings I’ve noticed regarding this artifact:
- it doesn’t get better or worse with time expansion or compression
- It changes a little based on sample rate and fft size, but it doesn't go away
- It appears to get worse when low frequencies are present (see link above to listen)
- the crackling is not present when the original signal is made up of a single sinusoid
I thought I might have had a 1 off error when rebuilding the signal from the processed frames like in this example, but I tested plain 400hz sin wave with no time scaling, and the processed waveform had no discontinuities in it, it was completely identical to the unprocessed waveform as expected.
I also tried applying a hanning window to the processed frames. This did fix the crackling, but because the output frames were already shaped as hanning windows from the when the hanning window was applied before processing, this introduced a different artifact that makes the audio sound like someone talking into a fan.
Does anyone know how to fix this? I was thinking about maybe applying a low pass filter, but I don't know if this would work. Im not experienced in signal processing so I'm hoping someone with a little more knowledge may be able to help.