Sound recognition (not voice) - recording instances and duration of

Have a question or want to start a discussion? Post it! No Registration Necessary.  Now with pictures!

Threaded View
I am trying to automate the recording of when, and how long for a
certain audio "Alarm" goes off. This alarm is located about 30 feet
from our house and the alarm can be going off for anywhere from 2 mins
to 30+ mins.

I need to use my PC (which is on 24-7) and its microphone (which i can
point towards the source of the sound) to take a note of when and for
how long the alarm sound is operating. I was thinking of using some
speech recognition program for this but am unsure if this would work
for the "Wa Wa Wa" of an alarm and not speech as is intended in these
applications.

I'm a VB programmer by trade so probably would be able to build
something to do this if I just knew where to begin. . .

it would be sort of like a motion dector security system but being
triggered by a specific sound instead of motion on a camera (the sound
in question is on a very short repeating loop)

does anyone have some usefull pointers on how something like this could
be achieved?



Cheers

Bondyboy


Re: Sound recognition (not voice) - recording instances and duration of
I'd just use something like CoolEdit and record for twelve or twenty four
hours.  If you start at 12AM then you'd have a good map of exactly when it
went off - you'd just read off the time tick marks.  With modern large hard
disk drives,  you can record quite a bit of audio on a PC.

We did a similar thing when we were concerned that the dog was barking in
the crate when we were out.  You get a mostly flat audio file with a few
small bumps.  It's very easy to zoom in on the little "bumps" that will show
in the audio file.  I am sure a wa-wa siren has a pretty distinct looking
signature.

If you're looking for proof you can take to court, you might have to get a
little more sophisticated.

--
Bobby G.


Quoted text here. Click to load it



Re: Sound recognition (not voice) - recording instances and duration of

Robert Green wrote:
Quoted text here. Click to load it


well i don't need it to prove anything in court, so your suggesting
could well work

on a related note does anywhere know of where I could source a
parabolic mic, or how i could hack my existing headset mic with a
parabolic surround?


Re: Sound recognition (not voice) - recording instances and duration of
There are numerous kits for voice activation. I would try to use one of them
(modified, if necessary) and log the times it switches on/off.

There's also a software app called Loop Recorder that records in a
continuous loop. You can set the duration of the loop. You might be able to
write some software that would start it and maybe save the result to disc
for instances of certain duration.


Quoted text here. Click to load it


Re: Sound recognition (not voice) - recording instances and duration of
Cheers guys, I'll try out your suggestions tonight, looprecorder looks
like it may help, but it'll still require manual input from me to note
when these alarms are happening

so you dont know of an application where, upon hearing a certain wave
shape (that would be "shown" to it beforehand) I could program it
populate a spreadsheet or database?

Although I suppose it wouldn't take me more than 20 mins to go through
a weeks worth of recordings each week, but it would be nice for it to
be automatic.

Thanks fellas

Bondyboy


Re: Sound recognition (not voice) - recording instances and duration of
Quoted text here. Click to load it

DragonDictate can be set up to run macros based on word recognition.  I
assume it could be set up to recognize your warble as a "command word" and
then excute a Word macro that adds a date/time stamp to a text file.  I've
never tried it though.  My experiment trying to decode dog barks was pretty
poor, if that's worth anything.  I do have DragonDictate running in the
other room and I do have a warbling piezo siren . . .

Even if it could be made to do that, I think it would be pretty worthless
for evidentiary purposes, though because someone could claim those were car
horns or geese honking.  I assume this has got some element of a dispute to
it.

I'd still vote for CoolEdit (or any number of WAV or MP3 recording programs)
set so that a day's worth of sound could be archived to CDRW.  Your evidence
would be far more solid since you could print out the CoolEdit wave files
showing the unique shape of the sound (I am assuming a warble alarm will
make a very noticeably uniform set of sine waves) with the time markers at
the bottom of the readout showing exactly when they occurred.

You can also add control sounds, like your car horn honking in your
driveway, to illustrate the relative loudness of the siren.

--
Bobby G.





Re: Sound recognition (not voice) - recording instances and duration of

Robert Green wrote:
Quoted text here. Click to load it

some good ideas there, it may be able to recognise the consistant wa wa
better than you managed with the dog barks

looks like i'll be busy on the weekend ;)

Bondyboy


Re: Sound recognition (not voice) - recording instances and duration of

Quoted text here. Click to load it

DragonDictate requires a pretty strong, clean audio signal.  I'll bet
neither dog barks nor sirens were something they optimized for in their
algorithms.  :-)  Good luck.

--
Bobby G.





Re: Sound recognition (not voice) - recording instances and duration of
This looks it better suits your need...

     http://www.softforall.com/mp3naudoi/AudioRecorders/Snooper01120041.htm


Quoted text here. Click to load it


Re: Sound recognition (not voice) - recording instances and duration of

Quoted text here. Click to load it

I'd imagine you should be able to get sound level data from the audio input
software API.  If you're writing an app it'd seem practical to keep a buffer
running in a loop, monitor a given audio level and then sample for a
frequency should the level exceed the threshold.  As in, don't bother
recording if the sound isn't from the device you're trying to monitor (dog
barking, passing police car, kids playing ball, etc).  VB.Net should make it
pretty straightfoward to get to the various APIs.


Re: Sound recognition (not voice) - recording instances and duration of

Quoted text here. Click to load it

The ca. 1999 Savoy Cyberhouse home automation software that I use has a
function module called "Listen" that can be trained to detect and respond
via rule sets to arbitrary environmental sounds such as alarm, clothes
dryer, furnace blower, etc for which it is trained. Alas, the software was
years ahead of its time and is no longer available.

There are many other efforts past and ongoing for both arbitrary sounds
and specifically alarm sounds using a variety of techniques.

"Incorporating Contextual Audio for an Actively
Anxious Smart Home" Simon Moncrieft et al
http://www.computing.edu.au/~svetha/papers/papers2005/conferences/moncrieff_ISSNIP_2005_373-378.pdf

The term "active anxiously" captures much.

"Detecting Alarm Sounds" D.P. Ellis
http://www.ee.columbia.edu/crac/papers/ellis.pdf

This is what you are trying to do, but please read what I write below on
the importance of a high-quality signal (close by, directional
microphone).

Here's SOLAR (Sound Object Localization and Retrieval in Complex Audio
Environments) the purpose of which is to " to detect and identify sound
objects, such as car horns or dog barks, in audio " that includes C source
code and some instructions.

http://www.cs.cmu.edu/~dhoiem/projects/solar /

source code;
http://www.cs.cmu.edu/~dhoiem/projects/solar/solar_src.zip

I used to use something called "Audio Signal v 1.1"

In general, needed steps are:

A#1) Signal acquisition. Both for monitoring and obtaining an initial
example so that you can "train" the software. A highly directional and
very close by microphone is key to success in your "from the wild"
scenario.  This in itself might be the major challenge. I can't emphasize
this enough. Most folks greatly underestimate the importance of microphone
placement. Whatever you were planning to do can probably be improved -- do
so!

2) Signal conditioning. If it is an alarm, it will have one or two
frequencies that predominate. It might help to set up two parametric
equalizers with a narrow ("notch') bandpass (one per stereo channel?) to
reject everything except the frequency/ies of interest. An alarm warble
tone may have two principal frequencies. You may want to remix to mono or
leave separate so as to be able to logically AND the recognition. But
sometimes the characteristic signal will be in the overtones and
distortion (or a combination of the fundamentals and overtones), so this
may be counterproductive. Depends in large part on how much background and
extraneous noise there is  (See A#1 above).

3)Training. You will want an example of he sound captured with the same
equipment a you plan to use for monitoring with which to train the
software.

5) Recording. Easily done these days directly to a digital file.

6) Detection. This is where the software is used. As previously remarked
by others, this can be assisted by manual review/inspection of the sound
file.

Good luck!  (And let us know what you work out.)

... Marc
Marc_F_Hult
www.ECOntrol.org

Re: Sound recognition (not voice) - recording instances and duration of
On Fri, 14 Jul 2006 09:54:24 -0400, Marc_F_Hult

Quoted text here. Click to load it

including some dyslexia ? ;-)

Should be " actively anxious ". Excellent paper in general with respect to
home automation. Fodder for useful HomeSeer/CQS add-ins that shows how
much the software side of HA lags the hardware (IMO/E).

(Activehome.com and Smarthome.com are already registered domains, but
Anxious Home.com and Actively.com are wide open ... ;-)

Quoted text here. Click to load it


Here's a related resource with matlab code to process spectrum analyzer
output to identify distinctive sinusoidal (eg burglar alarm) waveforms.

http://www.ee.columbia.edu/~dpwe/resources/matlab /

... Marc
Marc_F_Hult
www.ECOntrol.org

Re: Sound recognition (not voice) - recording instances and duration of
Thanks for all that info, alot for me to be going on with. . .

Would you believe that I've been recording all weekend and the alarm
I'm trying to capture has not gone off, soon as I get that sample I've
got some work to do.

Cheers

Bondyboy

Marc_F_Hult wrote:
Quoted text here. Click to load it
>http://www.computing.edu.au/~svetha/papers/papers2005/conferences/moncrieff_ISSNIP_2005_373-378.pdf
Quoted text here. Click to load it


Re: Sound recognition (not voice) - recording instances and duration of

Quoted text here. Click to load it

Maybe that wiley siren knows you're on to it.  <wink>

It could also be that the owner finally tuned up his alarm system and
eliminated the falsing that I assume you've been hearing.  If it was a
relatively new sound, that would be a good assumption.  No one wants a
falsing alarm and it's got to be louder (and therefore more of a bother) to
the owner than it is to you, whom I assume to be a neighbor.

--
Bobby G.




Re: Sound recognition (not voice) - recording instances and duration of

Robert Green wrote:
Quoted text here. Click to load it

After not going off all weekend it proceeded to go off at 9PM last
night up until at least 12PM when we went to bed, I've recorded it all
and'll have to take a look at the results tonight.

The alarm in question isn't a neighbours but it's an emergency vehicle
road crossing alarm that is supposed to stop the traffic to allow the
fire engine to cross the 4 lane road, it seems they went out on a call
last night and forgot to turn it off after they had used it. The police
turned up at the end and, although they couldn't switch it off, they
had to signal the people through, prehaps others had complained.

(I did hear alot of road rage type arguments and car horns caused by
the broken alarm, hopefully the mic would have picked that up too)


Re: Sound recognition (not voice) - recording instances and duration of

Quoted text here. Click to load it

Crikey!  Don't they have a timer on that thing that automatically shuts off
after giving them enough time to cross the road?

We don't have systems like that in that US (AFAIK) although we do have some
equally problematic train crossing gates.  The New York Time did a series
recently about how poorly maintained "grade" crossings are and how many
people have been killed because of stuck relays and burned out bulbs.   Some
of the freight railroads apparently maintain the grade crossings only after
they've already killed or maimed someone.

Good luck in getting that unit fixed so that it doesn't go off.  Sorry that
I assumed it was you neighbor's alarm since I've never encountered a device
like you've described for roadway crossings.

--
Bobby G.





Site Timeline