Fourier transform of a sound file

Question P6.8.3

The scipy library provides a routine for reading in .wav files as NumPy arrays:

In [x]: from import wavfile
In [x]: sample_rate, wav =<filename>)

For a stereo file, the array wav has shape (n,2) where n is the number of samples.

Use the routines of np.fft to identify the chords present in the sound file chords.wav. Which major chord do they comprise?

The frequencies of musical notes on an equal-tempered scale for which $\mathrm{A_4}=440\;\mathrm{Hz}$ are provided as a dictionary in the file

Solution P6.8.3