How do I modify this code so that it can remove background noise from the 'drop 3.WMA' file?

3 views (last 30 days)
How would I modify the following code so that it would delete background noise from the drop 3 file?
The image is the plotted audio data. The code is:
a=audioread('drop 3.WMA'); l=size(a); l=l(1); sound(a,44000) b=a(1:l); x=linspace(0,1,l); plot(x,b);

Answers (1)

Michael Abboud
Michael Abboud on 13 Jan 2017
To remove background noise from a signal, you will most likely need to know more about either the signal, or the noise. In particular, it can be helpful to know more about the frequencies of your signal or noise, as most filtering operations separate signals by frequency range. It can often be helpful to perform a Fourier Transform
For example, if the background noise is a low hum of a car or airplane, then you may want to use a highpass filter to reduce these low frequencies. If the background noise is a specific interference at 60 Hz, you can use a notch filter to attenuate a small range around 60 Hz. However, just by looking at your image there is no way to tell what is the signal and what is the noise.
For more information and some great examples on filtering noise from signals, I would suggest you refer to the following documentation page:
Michael Abboud
Michael Abboud on 13 Jan 2017
In this case, I would guess that the 'signal' is likely at a higher frequency than any background noise. I would suggest that you try performing a Fourier Transform on the signal to try and determine what frequencies are present. eg: Audio Signal Frequency Analysis
Then you can proceed to design a filter as demonstrated in the first link (perhaps a highpass filter) to attenuate the appropriate frequencies. Good luck! :)

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!