Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98126 > unrolled thread

Re: Detection of a specific sound

Started byMichael Torrie <torriem@gmail.com>
First post2015-11-02 20:49 -0700
Last post2015-11-03 09:57 -0500
Articles 5 — 4 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Detection of a specific sound Michael Torrie <torriem@gmail.com> - 2015-11-02 20:49 -0700
    Re: Detection of a specific sound alister <alister.nospam.ware@ntlworld.com> - 2015-11-03 08:50 +0000
      Re: Detection of a specific sound Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-03 09:03 -0500
        Re: Detection of a specific sound alister <alister.nospam.ware@ntlworld.com> - 2015-11-03 14:49 +0000
      Re: Detection of a specific sound Random832 <random832@fastmail.com> - 2015-11-03 09:57 -0500

#98126 — Re: Detection of a specific sound

FromMichael Torrie <torriem@gmail.com>
Date2015-11-02 20:49 -0700
SubjectRe: Detection of a specific sound
Message-ID<mailman.1.1446522557.8789.python-list@python.org>
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.

[toc] | [next] | [standalone]


#98141

Fromalister <alister.nospam.ware@ntlworld.com>
Date2015-11-03 08:50 +0000
Message-ID<n19sgq$ppu$1@speranza.aioe.org>
In reply to#98126
On Mon, 02 Nov 2015 20:49:03 -0700, Michael Torrie wrote:

> 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.

Personally I would forget trying to analyse sound & see if there is any 
way to get an input signal direct from the alarm (even if that is as 
crude as taking a tap from the siren feed wires) 

This application sounds far to critical for anything else.



-- 
 ______________________________________
/ "Can't you just gesture hypnotically \
| and make him disappear?"             |
|                                      |
| "It does not work that way. RUN!" -- |
| Hadji on metaphyics and Mandrake in  |
\ "Johnny Quest"                       /
 --------------------------------------
   \
    \
        .--.
       |o_o |
       |:_/ |
      //   \ \
     (|     | )
    /'\_   _/`\
    \___)=(___/

[toc] | [prev] | [next] | [standalone]


#98155

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2015-11-03 09:03 -0500
Message-ID<mailman.22.1446559416.8789.python-list@python.org>
In reply to#98141
On Tue, 3 Nov 2015 08:50:34 +0000 (UTC), alister
<alister.nospam.ware@ntlworld.com> declaimed the following:

>Personally I would forget trying to analyse sound & see if there is any 
>way to get an input signal direct from the alarm (even if that is as 
>crude as taking a tap from the siren feed wires) 
>
>This application sounds far to critical for anything else.

	A direct line is what I'd recommend too -- but I'm going to be paranoid
today:

	If a fire did occur, and the inspectors find traces of wiring going
into what was supposed to be a stand-alone detector there is a risk that it
will be concluded that the detector had been tampered with and may not have
been functional... And that could lead to all sorts of liability problems.

	I don't know if anyone makes a model that falls between (common)
stand-alone and full monitored (tied to burglar alarm system with a service
provider responding to triggers). Something of a monitored type (hence
designed to be wired to central panel) but without the outside monitoring
agency.


	Barring that... if the detectors are all close in pitch, a PLL circuit
fed from the microphone, using the "locked" signal to indicate when the
alarm is chirping -- gives a simple on/off digital signal for the computer
(the computer may be needed to ensure the chirps are at an expected rate
and not stray whistles). Beyond that, FFT to look for spectral signature of
chirps.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#98159

Fromalister <alister.nospam.ware@ntlworld.com>
Date2015-11-03 14:49 +0000
Message-ID<n1ahim$b9l$1@speranza.aioe.org>
In reply to#98155
On Tue, 03 Nov 2015 09:03:14 -0500, Dennis Lee Bieber wrote:

> On Tue, 3 Nov 2015 08:50:34 +0000 (UTC), alister
> <alister.nospam.ware@ntlworld.com> declaimed the following:
> 
>>Personally I would forget trying to analyse sound & see if there is any
>>way to get an input signal direct from the alarm (even if that is as
>>crude as taking a tap from the siren feed wires)
>>
>>This application sounds far to critical for anything else.
> 
> 	A direct line is what I'd recommend too -- but I'm going to be 
paranoid
> today:
> 
> 	If a fire did occur, and the inspectors find traces of wiring 
going
> into what was supposed to be a stand-alone detector there is a risk that
> it will be concluded that the detector had been tampered with and may
> not have been functional... And that could lead to all sorts of
> liability problems.
> 
> 	I don't know if anyone makes a model that falls between (common)
> stand-alone and full monitored (tied to burglar alarm system with a
> service provider responding to triggers). Something of a monitored type
> (hence designed to be wired to central panel) but without the outside
> monitoring agency.
> 
> 
> 	Barring that... if the detectors are all close in pitch, a PLL 
circuit
> fed from the microphone, using the "locked" signal to indicate when the
> alarm is chirping -- gives a simple on/off digital signal for the
> computer (the computer may be needed to ensure the chirps are at an
> expected rate and not stray whistles). Beyond that, FFT to look for
> spectral signature of chirps.

I would hope that most fire alarm systems (except domestic type smoke 
detectors) would have some relay outputs or telephone dialler options 
which would be legitimate locations to connect extra equipment.

The op probably needs to provide more information on the exact set-up 
intended.



-- 
 ______________________________
/ Gold's Law:                  \
|                              |
\ If the shoe fits, it's ugly. /
 ------------------------------
   \
    \
        .--.
       |o_o |
       |:_/ |
      //   \ \
     (|     | )
    /'\_   _/`\
    \___)=(___/

[toc] | [prev] | [next] | [standalone]


#98161

FromRandom832 <random832@fastmail.com>
Date2015-11-03 09:57 -0500
Message-ID<mailman.26.1446562685.8789.python-list@python.org>
In reply to#98141
Dennis Lee Bieber <wlfraed@ix.netcom.com> writes:

> If a fire did occur, and the inspectors find traces of wiring
> going into what was supposed to be a stand-alone detector there is
> a risk that it will be concluded that the detector had been
> tampered with and may not have been functional... And that could
> lead to all sorts of liability problems.

What about a *second* smoke detector?

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web