Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to decipher a message hidden within a very noisy audio file(.wav)(I think it is white noise with an additional low drone). The message is a six digit number. I have not have any further details about the noise.

I attempted to use a low-pass filter in the hopes that eliminating most of the higher frequencies would allow me to hear the numbers but, I seem to be unable to also get rid of enough of the low drone to hear the voice well enough. My attempt was as follows (the employed function freq_space_low_pass_filter is included at the end):

[data, SampleRate, NbitsPerSample]=wavread('noisy_msg6.wav');

y=data(:,1); % we will work only with one channel in this demo 
N=length(y); %number of sample points
t=( (1:N)*1/SampleRate ).'; % time spacing is 1/SampleRate and we want column vector


spectrum_freq=fourier_frequencies(SampleRate, N);

[spectrum_filtered,g_vs_freq]=freq_space_low_pass_filter(Y, SampleRate, Freq3db);



wavwrite(y_filtered/(0.1+max(y_filtered)), SampleRate, NbitsPerSample,

%%%%%%%%down sampling%%%%%%%%

indexes=(abs(spectrum_freq) < 10*Freq3db);
spectrum_freq_down_sampled = spectrum_freq(indexes);
spectrum_down_sampled = spectrum_filtered(indexes);
N_down_sampled = length(spectrum_down_sampled);



t_down_sampled = ( (1:N_down_sampled)*1/SampleRate_down_sampled ).';

sound(y_down_sampled, SampleRate_down_sampled)

function [spectrum_filtered,g]=freq_space_low_pass_filter(spectrum, SampleRate, Freq3db)
%% applies low pass filter in the frequency domain
% spectrum - result of fft on time series data (column vector is expected)
% SampleRate - measured in Hz, 1/dt where dt spacing of the points in time domain
% Freq3db - desired 3db roll off point in Hz


function G=filter_gain(freq, Freq3db)
    G=1./(1+1i*freq/Freq3db); % this corresponds to low pass RC filter

spectrum_freq=fourier_frequencies(SampleRate, N);

% calculate filter gain for each spectrum frequency
g=filter_gain(spectrum_freq, Freq3db);

Plot of the signal spectrum: picture

share|improve this question
can you provide us with a sample you're working with? and maybe your result? – penelope Dec 4 '12 at 8:56
I cannot upload the plot images( not enough points) and have no way to link you to the file – user1825494 Dec 4 '12 at 9:04
if you put links in the comments, somebody will gladly edit them in. And if you find a way to upload the files somewhere and provide link, get back with that as well. – penelope Dec 4 '12 at 9:06
The graph would be much more informative if it were plotted log-log. As it is, it looks like you have wideband noise from about 1.5 kHz to 22.5 kHz, with a narrowband tone at about 2 kHz. What I presume is the "voice" signal, along with what appears to be a significant DC offset, sits in a fairly quiet "hole". It really shouldn't be all that hard to isolate with a suitable bandpass filter. – Dave Tweed Dec 4 '12 at 20:23

A few points:

  1. Filtering in the frequency domain is complicated and needs a real algorithm like overlap add to avoid time domain aliasing. It's much easier to filter directly in the time domain: [b,a] = butter(1,100/(SampleRate/2); y_filtered = filter(b,a,y); is much better
  2. You probably want to put notch filter on the drone frequency
  3. For broad-band stationary noise a good method is Wiener filtering or spectral subtraction. Many papers have been published on this.
share|improve this answer

You mention using a low pass filter, but as one of the commenters mentioned you would probably do better with a band-pass filter to also filter out the low frequency noise. There also exists noise reduction filters in third-party libraries if you are interested in pre-existing solutions.

share|improve this answer

The human voice has some peculiarities that might help. For one, female voice starts at about 200Hz, male lower, so doing a high-pass filter here would help a bit. See also acoustic-features-distinguishing-the-male-and-female-voice.

Additionally, identify the drone frequencies via a histogram.

Doing all of this in code is a bit cumbersome. Have you considered some audio program like Audacity?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.