I am using cross correlation for sound localization. I have a four microphone array (arranged linearly). My problem is, sometimes the time diff found by cross correlation between a given pair of mics jumps to some eratic value. For example, if for the first three times it gives a value of 14 then the next time it suddenly jumps to some totally different value like 153 for the sound generated from the same point. Is this normal or am I doing anything wrong? My data collection procedure is as follows:
- Start listening
- Keep listening till trigger event occurs (which is a peak in the sound amplitude)
- As soon as the trigger event is noticed, collect sound sample for the next 300ms from all mics
- Calculate cross-correlation to find time diff
In order to detect the trigger event, I am listening for 10ms and checking the mic data if there is a peak in it. If yes, I record for the next 300ms and process it.
The ambient noise in my setup is very minimal so I dont think that is effecting the calculations. If anyone has come across a similar situation, could you please shed some light?