Transfer Adobe Audition Frequency Analysis to Python

Viewed 232

As I am trying to compare two wav files, I found that Adobe Audition does a really good Frequency analysis. From Adobe Audition, I get the following plot from the two wav files found here:

enter image description here

Thanks to the help from Woodford, an elegant solution was developed.

As I began using his ideas, I still could not figure out how to normalize (??) the plots to get that shown from Adobe Audition.

From the code that I use:

import scipy.io.wavfile as wavfile
import scipy
import scipy.fftpack
from scipy import signal
import numpy as np
from matplotlib import pyplot as plt

file2 = (r'G:/200460-6-5-0_Mono.wav')

file3 = (r'G:/205013-6-0-0_Mono.wav')

fs_rate1, signal1 = wavfile.read(file2)
f, Pxx_den = scipy.signal.welch(signal1, fs_rate1, nperseg=512, window='blackmanharris')
plt.semilogx(f, 10*np.log10(Pxx_den))

fs_ratepp1, signalpp1 = wavfile.read(file3)
#leftpp1 = signalpp1[:, 0]
fpp1, Pxx_denpp1 = scipy.signal.welch(signalpp1, fs_ratepp1, nperseg=512, window='blackmanharris')
plt.semilogx(fpp1, 10*np.log10(Pxx_denpp1))

plt.xlabel('frequency [Hz]')
plt.show()

I get this plot:

enter image description here

Can you help me to normalize(?) the y-axis for the plots to get the exact plot as obtained in Adobe Audition?

As I read the action that takes place when I use the "Scan Selection" button in Audition to get the plots, the documentation states that,

"Scans the entire file or selection, and displays average frequency data in the graph. (By default, the graph displays data from the center point of files and selections.)

Can you help me copy the plots obtain obtained in Audition to python?

0 Answers
Related