hi frnds i want matlab command or code for making speech waves with equal loudness in matlab i.e speech waves with same intensity and frequency.
Neeta Dsouza answered .
2025-11-20
[y1,Fs1] = audioread('myRecord1.wav');
[y2,Fs2] = audioread('myRecord2.wav');
y1n = soundsc(y1,Fs1);
y2n = soundsc(y2,Fs2);
Pxx1 = abs(fft(y1)); Pxx2 = abs(fft(y2)); dB1 = median(10*log10(Pxx1(1:(end/2)).^2)); dB2 = median(10*log10(Pxx2(1:(end/2)).^2)); dB = [dB1 dB2]; k = sqrt(10.^((max(dB)-dB)/10)); y1n = k(1)*y1; y2n = k(2)*y2;