Detection of a specific sound

William Ray Wing wrw at mac.com
Tue Nov 3 09:45:29 EST 2015


> On Oct 25, 2015, at 8:17 PM, Montana Burr <montana.burr at gmail.com> 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.
> 

I’ve been watching this thread and finally decided to jump in.

First off, we REALLY need to know a bit more about what you are trying to accomplish, in what sort of environment, and under what constraints (legal and otherwise).  That last bit is crucial.  Is this simply a heads up e-mail message to be sent or is it a way of notifying a backup (second tier) monitoring service.  Is it for your personal use, or do you expect to sell it (again crucial).  Does the computer you expect to run this on have a good UPS system (in a typical fire, AC power frequently fails early, sometimes it is the *cause* of the fire).  How are you going to get that notification out?  Does your network have battery backup?  Are you going to buy a station-service cell phone transmitter? If you are thinking of sending a cell phone msg, how do you guarantee the receiver is on?  LOTS of issues here.  Then, having said that, and in no particular order:

1) the sounders in most smoke alarms use over-driven pizeo-electric annunciators, their output has a VERY complex frequency spectrum with LOTS of harmonics.  Spectral analysis (combined with threshold analysis) MIGHT be a good way to go, but doing so in real time with Python would consume most, if not all the resources of the host computer;

2) You would (personal opinion), be much better off using hardwired or semi-hardwired detection.  There are several ways to go, including a detector microphone and transmitter such as is used to run a remote doorbell system (mount the microphone next to the smoke detector, then tap into the doorbell receiver box). These have adjustable sensitivity and would basically be a threshold detector.  Alternatively, almost all smoke detectors these days are designed to be chained to each other via three-wire (plus ground) AC wiring.  Two of the wires carry power, the third triggers all the detectors in the system to sound when if of them sound.  Don’t try to tap the signal wire (liability issues), but you could add another detector to the system which would act as your monitor if you tap *its* driver output.

3) Finally, how do you guarantee the computer on which the program is to run will be up at all times?  Does it auto-restart after a power failure, does the program auto-reload as part of the boot-up sequence, and finally, is the program going to have absolutely bullet proof error recovery?

-Bill





> Any help is greatly appreciated!
> -- 
> https://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list