0
$\begingroup$

Hello I am doing some work for a course and I need to take an audio file and remove the noise from it. So far I've removed the noisy signal which is a 1000Hz pure tone using the frequency domain. I did some fourier transforms, found the ranges for my filter and voila its done.

However part of my assignment asks me to do this in two ways, implying that this can also be done in the time-domain. I'm confused as I just can't understand how I would remove a tone completely in the time domain without using frequencies.

My question is are there ways to remove noise from an audio file without using the frequency domain?

Here's the audio file if you'd like to listen for yourself: https://drive.google.com/file/d/1OM4OI4egSE7E5M2-l2WypUwtJ0pqEhaB/view?usp=sharing

$\endgroup$

2 Answers 2

0
$\begingroup$

I think the lesson being taught in your assignment is that multiplication in the frequency domain (as you had done by masking an FFT) is convolution in the time domain. Taking the inverse FFT and convolving that with the signal would result in a similar filtering of the tone. To note that using the FFT and inverse FFT results in circular convolution, rather than linear convolution. Ultimately it is the impulse response of the filter in the time domain that is convolved with the signal, which is equivalent in the frequency domain to the product of the Fourier Transform of the filter’s impulse response with the Fourier Transform of the signal.

$\endgroup$
7
  • $\begingroup$ I think I remember reading something along the lines of this. So if I am understanding correctly multiplying my original signal by the Inverse Fourier Transform of my filtered signal would result in a signal in the time domain that does not have the high pitch sound. $\endgroup$ Dec 14, 2021 at 17:01
  • $\begingroup$ @KaasimShaikh almost but not quite--- you need to CONVOLVE in the time domain, which is the same as MULTIPLY in the frequency domain. Convolving the time domain signal with the inverse FFT after shifting the DC bin to the center of the array, and putting the second half of the array to the beginning (fftshift in MATLAB/Octave or Python Scipy.signal) will do this filtering you describe (although it is suboptimal, but sufficient for your purposes I believe). $\endgroup$ Dec 14, 2021 at 18:17
  • 1
    $\begingroup$ Okay that actually makes a lot of sense now. You are a life saver! Thank you :). $\endgroup$ Dec 15, 2021 at 14:39
  • $\begingroup$ Hey @DanBoschen I have one more question. I did exactly what you said and I was able to remove the tone but my professor being the tough cookie he is added another tone later in the signal. So I have 1 tone at 1100Hz and another tone at 2700Hz. I used a bandstop filter to remove the first tone at 1100Hz and convoluted the bandstop and the original signal. But how would I remove the 2700Hz signal? Would I filter it separately and then combine both filtered signals? $\endgroup$ Dec 15, 2021 at 15:08
  • 1
    $\begingroup$ I cannot thank you enough for your help. You pointed me in to the right direction and I am very grateful. I've successfully removed the sound using the convolution method. Thank you and have a good day. $\endgroup$ Dec 15, 2021 at 16:32
1
$\begingroup$

There is no separate time domain or frequency domain. At least not in the practical, physical world. Those are just two different ways of analyzing one single reality.

A simple notch filter consisting of a biquad or two could be thought of as «time domain» but it will have consequences in the frequency domain that may be what you want.

A PLL or an adaptive filter might also accomplish what you want.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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