Processing Blocks
Audio windows
How Studio cuts each sound clip into short windows before the processing block sees it.
Try it in StudioOn 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.
| Setting | What it means | Usual value |
|---|---|---|
| Window size | Length 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 audio | 16000 |
| Train on data subset | Share 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:
| Window | From | To |
|---|---|---|
| 1 | 0 s | 1.0 s |
| 2 | 0.5 s | 1.5 s |
| 3 | 1.0 s | 2.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.