Python GCC-PHAT works for me really well in a quiet environment. However, in a noisy environment, the results are no good. I want to locate a source of the sound of a known frequency range between x and y in a noisy environment.

The question

How can GCC-PHAT work on specific frequencies?

What I tried

In the gcc_phat I zeroed-out all but the frequencies between x and y. However, this zeroed out the tau result of gcc_phat function.

  • $\begingroup$ Generally speaking zeroing-out frequency bins is not a very clever thing to do. Zeroing out in the frequency domain can result in very long ringing in the time domain, which will result in time aliasing if you haven't zero-padded sufficiently in advance. This can ruin your DoA estimation results from either GCC-PhaT or ANY other algorithm. I suggest you use proper (band-pass) filtering prior to feeding the data to the algorithm, like it is suggested in at an answer. $\endgroup$
    – ZaellixA
    Feb 4, 2022 at 1:12

1 Answer 1


Since your sound source has a known frequency range, I would recommend a pre-filtering for noise reduction before DOA estimation.

You can use a bandpass filter with the specific frequency range, and then put the filtered signals into GCC-PHAT algorithm.


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.