Script for onset detection

"Can anybody provide me with a script that detects the onset of sound (i.e. the end of silence)."

You can create an Intensity contour and look for the first frame that is above some predefined threshold:

To Intensity: 100, 0
n = Get number of frames
for i to n
    intensity = Get value in frame: i
    if intensity > 40
       time = Get time from frame: i
       writeInfoLine: "Onset of sound at: ", fixed$ (time, 3), " seconds."

Since the intensity is computed with rather long windows, the result may be 0.01 or 0.02 seconds before the actual start of sound.

Links to this page

© ppgb, January 12, 2014