sox input.wav segment-%1n.wav trim 0 30 : newfile : trim 0 30
Split audio into 30-second files
Splits the audio into 30-second chunks named segment-01.wav, segment-02.wav and so on. The colon separates effects chains: trim 0 30 writes the first 30 seconds, then newfile starts the next chunk. %1n is the counter placeholder.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.