Am trying to remove noise for certain frequency bands by attenuating freqeuncy bins in the FFT array. However this results in artifacts to be formed, where there are clicking sounds in between each frame. Im already using a frame length of 1024 with 50% overlapping hamming window at 48000 sampling rate. How do I remove the artifacts while still being able to suppress the noise?
You do not want to do the filtering in the frequency domain with essentially a brick wall filter. A perfect rectangular brick wall filter needs infinite support in the time domain. In practice, this isn't possible so your filter coefficients ( the sinc function ) will be truncated. This is fine unless you need these segments to fit back together (audio processing, etc) because at the transitions it will not be well behaved. This is because zeroing a bin / or attenuating a bin is essentially adding a sinusoid with opposite phase and magnitude into your signal. The fft only picks up exactly periodic frequencies in your signal, all other signals will be 'spread' across the spectrum so in attenuating the exactly periodic bins you are adding sinusoids with opposite phase and magnitude to your signal and these are all adding up with the other signals in your signal to be ill behaved (not perfectly continuous) at the frame boundaries.
If your FFT is not zero-padded, then your frequency domain filtering will result in a circular convolution, where the end of your filter's impulse response will corrupt the beginning of each FFT/IFFT window of data, and likely produce artifacts at each frame boundary.
If you zero-pad your FFT by the length of the impulse response of your filter, then you can use overlap-add or overlap-save fast convolution to concatenate the tail of the impulse response of each filtered frame into subsequent windows where they belong (instead of a circular corruption).
Note that just zero-ing FFT bins is the same as a brick-wall rectangular filter which has an infinite impulse response, thus will usually corrupt your data, even with a lot of added zero padding. So a more reasonable filter kernel (with a finite length impulse response) is required to do FFT filtering.