please I wanna have the code for this project Task Record yourself saying “I lov
ID: 2083390 • Letter: P
Question
please I wanna have the code for this project
Task
Record yourself saying “I love Matlab” short phrase in about 8 seconds (leave very short pauses between the words)
Make sure the microphone is on.
In the Matlab workspace window, type
fs = 10000;
speech = wavrecord(80000,fs);
Save the wave file as ‘your_last_name.wav’
Now you have a .wav file.
Add white noise at 5dB SNR to your speech, and save the noisy speech as noisy_speech.wav. What do you notice?
Obtain the spectrum of your speech.
Research about moving average filters. Use a 10-point moving average filter to filter out the noise from noisy_speech.wav. Save the filtered speech as filtered_speech.wav. plot, listen to, observe and analyze your output.
Here’s what you need to hand in:
A report: discuss the project and the rationale behind the methods. Show plots of the noisy and clean. Show plots of your speech and spectra.
All mfiles including your main file
Your recorded speech file, your filtered speech file.
Explanation / Answer
close all,
clear all,
clc,
y = [];
for r=1:50000
y(r) = rand;
end
Fs = 10000;
filename = strcat('d:your_last_name.wav');
wavwrite(y,Fs,filename)
samples = [1,2*Fs];
clear y Fs
[y,Fs] = wavread(filename,samples);
%Play the samples.
sound(y,Fs); % Original Signal
SNR=5; %SNR = 5db
z=awgn(y,SNR,'measured');
Noise = (y - z);
pause(1);
sound(Noise,Fs); % White Noise Sound
pause(1);
sound(z,Fs); % Noisy Signal Sound
length(y)
length(z)
r=1:length(y);
subplot(3,1,1); plot(r,y); title('Original Signal');
subplot(3,1,2); plot(r,Noise); title('Noise Signal');
subplot(3,1,3); plot(r,z); title('Original + Noise Signal');
%{
The present work is for sampling a text message into voicce. The voice is recorded using the PC microphone and saved as wav fil namely your_last_name.wav. This sound file is added a white noise at SNR = 5 db using awgn function in matlab. The original signal, added white noise and noisy signal, all three are plotted using the plot command in matlab. The sound in original and with noise can be heared using the sound function in matlab.
The pause function is used to give one sec. delay in between the original, noise and noisy sound signal
%}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.