Check the maths
The browser has a Fourier transform of its own built in. Here it runs beside ours on exactly the same sound, with the difference between the two answers drawn underneath.
What you are looking at
The pale line is our transform, the cyan line is the browser’s. Where they agree, the cyan simply covers the pale one. The panel below draws what is left over, magnified — a few hundredths of a dB near the peaks is floating-point arithmetic, not disagreement.
Honest about the result: the browser’s is faster, because it is native code. The claim being made here is correctness, not speed.
Window size2048 samples