Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search for instances of a sound bite in an audio file

Tags:

audio

I have two audio files. One lasting roughly one second, containing a very boring "beep" sound, and the other lasting about 60 minutes, filled with random sound (talking, noise, etc.) as well as instances of the same "beep" noise (NB: the "beep" noise may occur at the same time as other sounds!).

Can anyone suggest to me an easy way to write a program that searches through the 60 minute audio file, and returns a timestamp for every instance it finds of the "beep" noise? I've been searching around for how to do this, but I'm having trouble figuring out even what terms to search for/read about.

I would prefer to use Python if possible, but I'm also willing to use C, C++, Java or (what seems most obvious to me) Matlab. Feel free to point me towards textbooks, concepts, or anything else that you think might help. I'm willing to do a substantial amount of learning to figure out how to do this. Any help is greatly appreciated!

edit: title for clarity

like image 712
smessing Avatar asked Mar 28 '11 23:03

smessing


1 Answers

I guess that you'll have to turn the signal into the frequency domain (FFT), then read the sound from the start to finish, and search the places where your desired frequency exceeds some threshold, and then look that it repeats for at least one second. Hope your beep will be loud enough so the threshold could be set high enough and the sound won't be confused from 'background' noises and voices.

like image 143
Daniel Mošmondor Avatar answered Oct 04 '22 13:10

Daniel Mošmondor