Question

contents  Please use the DFT to convert the given sound file (wav) signal from time...

contents
 Please use the DFT to convert the given sound file (wav) signal from time domain to frequency domain and output vibration.
The text size of the size and phase size
 Program requirements
Requires the use of argc and argv
Enter XXX.exe input.wav magnitude.txt phase.txt in cmd
It can be executed. The input is the audio file (input.wav), and the output is amplitude and phase.
Small text file (magnitude.txt/phase.txt)
“ “rb” is used for the read mode and “wb” for the write mode.
Remember to add notes
 Payment format
 Please submit the .c file .m file and the amplitude and phase map files for a total of four files.
The file name is Ex:XXX.c XXX.m
 Reminder
How many points of DFT are made based on how many sample points are in the original sound file.
Please use db for amplitude and amplitude units.

Homework Answers

Answer #1

enter the following code in MATLAB

[y1 Fs]=audioread('speech.wav');

y=y1';

T=fft(y);

T1=abs(T);

phase=angle(T);

N=length(T);

P = abs(T/N);

f= Fs*(0:N-1)/N;

t=1./f;

subplot(3,1,1);plot(t,y);title('Sound signal');

xlabel('time in seconds');ylabel('Magnitude');

subplot(3,1,2);plot(f,P);title('Amplitude Spectrum of the sound signal');

xlabel('frequency in Hz');ylabel('Magnitude of the Spectrum in dB');

subplot(3,1,3);plot(f,phase);title('Phase angle of the sound signal');

xlabel('frequency in Hz');ylabel('Magnitude of the phase angel');

The plots are as follows


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