Community Forums Archive

Go Back

Subject:Need to add markers after periods of silence
Posted by: Shredder
Date:2/11/2006 4:20:55 PM

I'd like to write a script to scan a file for periods of silence (determined by a DB threshold) that last longer than N seconds and add marker there.

This would be my first time scripting SF... if you think this can be done please point me at the core functions to use and i'll figure out the rest

Thanks!

Subject:RE: Need to add markers after periods of sile
Reply by: _TJ
Date:2/11/2006 5:46:34 PM

Can you use Tools->Auto Region?

Subject:RE: Need to add markers after periods of sile
Reply by: Shredder
Date:2/12/2006 2:38:21 PM

I tried that, but this doesn't work for my needs. This splits on all attacks. I get way too many regions.

I need one that splits on an attack after N seconds of silence. also, Auto Region only allows 3s as the largest minimum clip length. If i could use a much larger number, i could tune the heuristics.

I'm gonna have to write my own. What SF procedures should i use to detetct sample volume etc?

Subject:RE: Need to add markers after periods of sile
Reply by: _TJ
Date:2/12/2006 6:40:15 PM

What about using Autoregion, followed by statistics on the regions to identify which ones you want to keep and which to throw out?


Message last edited on2/12/2006 6:41:32 PM by_TJ.
Subject:RE: Need to add markers after periods of sile
Reply by: Shredder
Date:2/13/2006 7:56:01 AM

This still seems convoluted, like trying to fit a square peg into a round hole.

This is a process i have to do on a daily basis for a 3.5 hour recording with an indeterminable number of commercial breaks which are of varying length and positioned in an unpredictable part of the recording.

auto region created 100s-1000s of regions, and would be more difficult to sift thru that then editing manually (as i have been doing).

I'm willing to code a specific solution to my problem:
1. find periods of silence (silence defined as samples below N dB)
2. find periods of specific minimum length
3. drop a track marker in the middle of that silence
4. further filtering can be done by specifying inter-period length must be at least N seconds (where N can be a large number, like 30s or even many minutes)

-- This should give me a more manageable set of regions. (the ones i want plus a few extra where the speakers pause for a long time to collect their thoughts etc.

I can already manually edit these in 30mins, the bulk of my time is finding the breaks - i'd like to get this down to 10mins

Message last edited on2/13/2006 7:56:31 AM byShredder.
Subject:RE: Need to add markers after periods of sile
Reply by: _TJ
Date:2/13/2006 11:49:25 AM

Ok. If you want to do this by examining the data. the function for that is
ISfFileHost.ReadAudio(...). This will return an array of samples as, In16, Int32, float, etc. depending on what type of array you pass to the function.

What you do after that is entirely up to you.

tj

Go Back