The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 19, 2019, 05:22:05 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: .wav file  (Read 5967 times)
ekibastos
Rookie
**
Offline Offline

Posts: 38


View Profile
« on: November 24, 2008, 10:46:22 PM »

Does anyone here have any experience with 'parsing' through .wav files.

I mean isnt it just data in some form or another and what language would you use to attempt this?

I have an application that records .wav files and names them thedatethetimeandakeyidyouselct.wav once every x seconds 60 seems to work good.  The point is I am using this as a surveillance system and I have to spend as much time listening to the .wav files to decide there is new content on them as opposed to the way i handled my video surveillance system. I took a picture every second on a timer and then wrote a file compare function that compared the two files and if they were at all different i figured someone had walked across the frame of the camera so i recorded that frame ..  or to keep new motion from a time lapse so i dont build huge dirs full of  files and data entry jobs for myself later.

I was wondering if this might work with .wav or some other soundfile technology to get new sounds that were 'not silent' so they could be indexed and tagged for easier collection of the new sounds. (assuming that it was normally absolutely quiet).

nice forum, btw.
Logged

<quote nutballs>
Apple is that hot chick that gives you lots of sex but is a total bitch with a horrible abusive temper.
</quote>
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #1 on: November 25, 2008, 07:10:37 AM »

You could create a hash from the wav file programatically and then compare the hash to a "silent" hash.

Actually if they're all of exactly the same fixed length you could get away with a simple diff between the two. There are about a billion and a half ways I could think to do what you're trying to do just using some shell scripting. If you use Windows you'll have to ask someone else though. I get less and less familiar with that crippleware every day.
Logged

hai
cd1
Rookie
**
Offline Offline

Posts: 16


View Profile
« Reply #2 on: December 17, 2008, 06:49:19 PM »

The wave file is just a stream of integers sampling of the waveform of the sound.  Depending on the settings of your sound card, you should be able to read a wav file of the silent room, get the min/max values of that sample, then multiply it by 15-20%.  Then use those #s as a trigger.  You can write your program to read through the wave files, and if the sample is bigger/smaller than the trigger, have a counter increment.  If the counter increments 10 times in a minute, then you might have something to listen to. 

The percentages and counter #s are just guesses, you'll have to play with the numbers to take into account background noise, air conditioning, etc.

Play w/ some audio software that allows you to visualize the waveform... then you'll have a better idea of what you're dealing with and where and how often to set the triggers.
 
Logged

No links in signatures please
nop_90
Global Moderator
Lifer
*****
Offline Offline

Posts: 2203


View Profile
« Reply #3 on: December 17, 2008, 08:01:36 PM »

FFT
Logged
Arnoldlee
n00b
*
Offline Offline

Posts: 1



View Profile
« Reply #4 on: June 06, 2011, 02:52:43 AM »

Some wave file is not supported in my mobile..is there any other way to play them..
Logged

No links in sig.
dee
Journeyman
***
Offline Offline

Posts: 94


View Profile
« Reply #5 on: March 10, 2012, 11:49:55 AM »

Im sure this has prolly been well resolved by now, but why not use something that already exists and is threshold dependant as a starting point... loads of em. Gates.Compressors etc
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #6 on: March 10, 2012, 01:57:46 PM »

Agree, I think it'd be a whole lot easier to clean the recording end than try to work that hard in post processing.

A pretty simple noise gate set a little aggressively would do the ice. And if you knew that it's always talking or something like that you want to trigger on, then tightening the target with a high pass and a low pass could make the record trigger pretty accurate.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
dee
Journeyman
***
Offline Offline

Posts: 94


View Profile
« Reply #7 on: March 10, 2012, 02:38:01 PM »

Quote
Agree, I think it'd be a whole lot easier to clean the recording end than try to work that hard in post processing.

A pretty simple noise gate set a little aggressively would do the ice. And if you knew that it's always talking or something like that you want to trigger on, then tightening the target with a high pass and a low pass could make the record trigger pretty accurate.

Totally . If you know what your doing (which it sounds like you probably do) then there must be a way of logging a threshold switch externally ?Could you do it with AU lab ? Its bundled with xcode. Im a beginner so dont know but worth a check.
Logged
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #8 on: March 11, 2012, 09:41:12 PM »

Oh totally. If you were using a Mac as the recording device y culd do all kinds of sophisticated things before it was committed to disk. Not the least of which would be to lay down a time track (think SMPTE) yet only record at certain thresholds ... Easy stuff if you spend a little time. Then you could write a little browser that played only when the gate was open ... But you could take the whole thing and lay in into iMovie and it'd line up against the video.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!