MATLAB: (a) Please load the audio file ‘PhoneSound.wav’ and plot the audio signal X .(b) Please divide X into 10 segments having equal length (0.5 sec), and plot the power spectral density for each segment

baMATLAB

( c) From each plot, you will find two pitches and please tell what number was dialed based on the definitions provided in the below table. Please answer what phone number was dialed?
2018-11-17_155442.png
And this is my code, which can only be the answer of (a)(and the I'm not sure if this answer is right)
[y, Fs]= audioread('PhoneSound.wav');
filename= 'PhoneSound.wav';
audiowrite(filename, y,Fs);
clear y Fs
[y, Fs]= audioread('PhoneSound.wav');
sound(y, Fs);
plot(y, Fs);
but the fig looks strange……
2018-11-17_160729.png
the attachment is the zip of the audio

Best Answer

t = (0:length(y)-1)/Fs; plot(t,y)
At 8000 samples per second, and frequencies over 1000 Hz, you should not expect to be able to resolve much by eye.
spectrogram(y,kaiser(256,5),220,512,Fs);
view(-45,65)
colormap bone
Related Question