Answered
Frequency analysis are different. (python numpy fft and frequency analysis of Audition)
- April 16, 2021
- 1 reply
- 1024 views
Frequency analysis was performed with the following Python code.
def GetFreq(wav_file_path, start_sec, end_sec, N):
overlap_pt = N//2 #50% overlap
#read wav file
ir, fs = sf.read(wav_file_path)
st_sample = int(start_sec*fs)
ed_sample = int(end_sec*fs)
frame_num = (ed_sample - st_sample) // overlap_pt - 1
#window
window = np.blackman(N)
acf = 1/(sum(window)/N)
FFT_result_dB = np.zeros((0, N//2+1))
for i in range(frame_num):
FFT_result_dB = np.append(FFT_result_dB, np.zeros((1, N//2+1)), axis=0)
st = st_sample+i*overlap_pt
ed = st+N
#windowed
x_windowed = ir[st:ed]*window
#FFT
F = np.fft.fft(x_windowed)
F = F * (2.0 / N) #Normalization
F = F * acf
F_abs_amp = np.abs(F)
F_abs_amp_dB = 20.0 * np.log10(F_abs_amp + 1.0e-10)
FFT_result_dB[i] = F_abs_amp_dB[:N//2+1]
#Averaging
fft_out = np.average(FFT_result_dB, axis=0)
freq = np.arange(0, fs, fs/N)
freq_out = freq[:N//2+1]
return [freq_out, fft_out]
if __name__ == "__main__":
freq, fft1 = GetFreq('sin100Hz.wav', 1, 4, 512)
freq, fft2 = GetFreq('WN.wav', 1, 4, 512)
Frequency analysis was performed in Audition at the same FFT point.
Compare the results of the two frequency analyzes.
For a 100Hz sine wave, the values are about the same. However, white noise has a different amplitude.
For 100Hz sine wave

For white noise

Why does it make a difference?
Is there any technical document of frequency analysis by Audition?
Best regards.
