Skip to content

Processing Blocks

Audio windows

How Studio cuts each sound clip into short windows before the processing block sees it.

Try it in Studio
On this page

The idea in one minute

A model needs inputs of the same size every time. Sound clips have different lengths, so Studio cuts each clip into windows: short pieces of the same length. The processing block turns each window into features, and the model makes one prediction per window.

You set this up in the first column of Create impulse, called Time series data.

SettingWhat it meansUsual value
Window sizeLength of each piece of sound, in milliseconds (100–5000 ms)1000 ms
Window increase (stride)How far the window moves before the next piece starts (50–2000 ms)500 ms
Frequency (Hz)Sample rate of your audio16000
Train on data subsetShare of the training data to use (100 % = all)100 %

A simple example

A 2-second clip with Window size 1000 ms and Window increase (stride) 500 ms gives three overlapping windows:

WindowFromTo
10 s1.0 s
20.5 s1.5 s
31.0 s2.0 s

Every window gets the clip's label. A smaller stride gives more (and more overlapping) windows from the same recordings, which gives the model more examples to learn from.

A 1-second clip with a 1000 ms window gives exactly one window. That is why recording in 1-second clips is a good habit.

Choosing the values

  • Keywords and short sounds ("yes", a clap): 1000 ms usually holds the whole sound.
  • Longer sounds (a machine cycle, a siren rise): try a longer window, such as 2000 ms.
  • Keep Frequency (Hz) at 16000 for audio recorded in Studio, which is saved at 16 kHz.

Where you use this in PetalEdge