The sampleRate read-only property of the AudioData interface returns the sample rate in Hz.
sampleRate
MDN Reference