Question

Create a MATLAB script to record a few seconds of data from the computer microphone and...

Create a MATLAB script to record a few seconds of data from the computer microphone and then display the spectrogram for the recording. For example, I said into the microphone “compute this now”. Also interesting is whistles with increasing or decreasing pitch. A period of silence between sounds or utterances makes it easier to distinguish in the spectrogram. Use an ?s that is compatible with the computer sound card (e.g. 44.1 or 22.05 kHz). Submit the spectrogram of the sound recorded with a short description of the sound. Gauge the frequency range that needs to be plotted based on what was recorded.

Homework Answers

Answer #1

Matlab Code:

Fs = 44100 ; %Sampling Frequency


Y = audiorecorder; %Records audio with default sampling Frequency compatable with your device
disp('Start speaking.')

recordblocking(Y,5); % 5 seconds record
disp('End of Recording.');


sig = getaudiodata(Y); % convert into a vector signal
plot(sig)
title('Recorded Signal')
xlabel('Time')
ylabel('Amplitude ')
figure()
spectrogram(sig,128,120,128,Fs,'yaxis')

Output:

NOTE: Make sure you have a working audio recording device. The output may differ every time as the recorded signal is unique every time.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT