The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. February 11, 2012, 03:00:36 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: .wav file  (Read 2618 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.
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!