I have this assignment that I can't figure how to solve.
I have a sound.wav human-voice file, and use matlab add-random-noise (monotonic)
Goal: to remove the noise from the sound (and the sound from the noise)
What I've done so far is to read the file and then add the noise. I then do an fft. Now I need to analyze the frequency spectrum, but I'm not sure how to do it. And finally do an ifft to recover the sound back.
I've used many kinds of filters: low pass, high pass, band pass, moving average.
The problems were:
I've managed to filter the sound without the noise BUT the sound always got worse as well.
It worked only for specific cases of random noise but not for any random noise that function might produce.
Any help would be appriciated. Thanks!
add_random_noise.m function yn=add_random_noise(y,Fs) n=[0:length(y)-1]'; r=rand(); %%rr=1+rand(); %%rrr=2+2*rand(); c=cos(2*pi*440*r*n/Fs);%%+cos(2*pi*440*rr*n/Fs)+cos(2*pi*440*rrr*n/Fs); yn=y+c/17; yn=yn/max(yn); end
I have changed the add "noise" to return only one sinusoid noise. I run the same noise with my original wav and with zeros and watched the noise in the peak in the range of the lower frequency
now i`m having truble to make the filter: matlab How to design lpf\bpf\hpf without builtin functions