Detection of a specific sound

Michael Torrie torriem at gmail.com
Mon Nov 2 22:49:03 EST 2015


On 10/25/2015 06:17 PM, Montana Burr wrote:
> I'm looking for a library that will allow Python to listen for the shriek
> of a smoke alarm. Once it detects this shriek, it is to notify someone.
> Ideally, specificity can be adjusted for the user's environment. For
> example, I expect to need moderate specificity as I live in a quiet
> neighborhood, but an apartment dweller might need more.
> 
> I'm thinking of recording a smoke alarm and having the program try to find
> the recorded sound in the stream from the microphone.
> 
> Any help is greatly appreciated!

At this point, from what you say, your problem is not a python one. It's
a more general problem that you have to tackle.  In other words how are
you going to identify this one sound amongst background noise?  Once you
know that, then you can apply Python to the problem.

I suggest you spend some time exploring how you would actually go about
recognizing a particular sound algorithmically.  Relevant tops of
research include: digital signal processing and fourier analysis.

A quick google search reveals some info that may point you in the right
direction:

https://blog.adafruit.com/2015/01/12/think-dsp-introduction-to-signal-processing-using-python/
http://samcarcagno.altervista.org/blog/basic-sound-processing-python/

I know very little about the subject, but if it were me, my naive
approach would be to do fourier analysis on the sound you are trying to
identify to pick out the sound's fingerprint (certain component
waveforms that stand out), and then do the same analysis on your audio
stream, looking for this footprint.



More information about the Python-list mailing list