I want to use Fourier Transformation to compute the similarity of 2 audios. I am dealing with small audios having the same size: 1 second length, mono channel. My question is how can I use the Fourier Transformation of these 2 audio files to check wether they have the same sound or not. My focus is about high intensity sounds like hand clap for instance. The 1st audio file is the reference one. It represents a hand clap sound, for example. And I am checking if the 2nd audio includes or not this hand clap sound. Would be possible to describe how can I perform this check (I am programming in java) ?

Thanks in advance. Kind regards.

  • $\begingroup$ Do they have the same sound or similar sound? Are they actually one hand clap or two different hand claps but close enough? $\endgroup$
    – ZR Han
    Commented May 21, 2021 at 1:32
  • $\begingroup$ Currently I want to implement an application where I store a short audio file (about 1 second length) that includes a hand clap sound. Then while listening to the Mic I have to detect the presence or not of a hand clap in the listened sound. So my question how to make this kind of check using FFT (already impelemented). $\endgroup$
    – Newdevos
    Commented May 21, 2021 at 8:56
  • $\begingroup$ So you are doing something like voice activity detection. You can calculate the cross-correlation of FFTs (or some other feature, maybe not in frequency domain) of recorded sound and the reference clap, and then apply a threshold. $\endgroup$
    – ZR Han
    Commented May 21, 2021 at 9:03
  • $\begingroup$ Is it true that the cross-correlation of the 2 FFTs is equivalent to the convolution product of the 2 FFTs ? If it is the case the result of such operation is an array of Complex numbers. So I am wondering the threshold will be applied to the max of Abs value of these complex numbers or shall I make use of the convolution result ? Sorry for asking stupid question (I am new in this field). Thanks in advance. $\endgroup$
    – Newdevos
    Commented May 21, 2021 at 10:00
  • 1
    $\begingroup$ Why do you want to use an FFT? For clap detection, time domain would probably be a lot easier $\endgroup$
    – Hilmar
    Commented May 21, 2021 at 12:05