Log inRegister


This is the easiest software to concatenate and/or split audio files.



Wordt standaard geïsntalleerd in C:\Program Files (x86)\sox-14-4-2>

Manuals & resources


Focusing on split on silence

Concatenate in real life

It works with .wav, .mp3, …

Het laatste bestand is altijd het doelbestand, de voorgaande de bronbestanden:

sox first.mp3 second.mp3 third.mp3 result.mp3

see: https://stackoverflow.com/questions/25280958/sox-concatenate-multiple-audio-files-without-a-gap-in-between

C:\Program Files (x86)\sox-14-4-2>sox 1.wav 2.wav 3.wav 123.wav

Simple split in real life

De output-bestanden krijgen vanzelf een volgnummer mee:

sox infile.wav output.wav trim 0 30 : newfile : restart

Zo bijvoorbeeld:
sox 15.wav output.wav trim 0 75 : newfile : restart
sox WARN trim: Last 1 position(s) not reached (audio shorter than expected).

Je krijgt dus netjes een melding dat de laatste in de rij korter zal zijn.

Get the last part of an audio file, skipping x seconds

skip e.g. 70 seconds

sox 10.wav out.wav trim 70

Split manually in unequal sections

The following is an example of splitting (the first x seconds of) an input file into a 42.65 second file a 43.1 second file, a 73 second file and ignoring the rest. (http://sox.sourceforge.net/sox.html)

sox BuxIn034.wav BuxOut%1n.wav trim 0 42.65 : newfile : trim 0 43.1 : newfile : trim 0 73

Split where silence

See another example splitwavxx.bat.

I had a large .wav file from a concert, that I wanted to split into the separate pieces, based on the silence between the pieces. I knew there were 43 pieces, an intro and an applause at the end, so in total I needed 45 files:

sox -V3 BuxIn.wav BuxOut.wav silence 1 3.0 0.1% 1 0.3 1% : newfile : restart

→ 100 files

  • The first triplet of values means remove silence, if any, at the start until 3.0 seconds of sound above 0.1%.
  • The second triplet means stop when there is at least 0.3 seconds of silence below 1%. changed into: 0.3 seconds of silence below 0.3%
sox -V3 BuxIn.wav BuxOut.wav silence 1 3.0 0.1% 1 0.3 0.3% : newfile : restart

→ 33 files => changed into: 0.3 seconds of silence below 0.38%

sox -V3 BuxIn.wav BuxOut.wav silence 1 3.0 0.1% 1 0.3 0.38% : newfile : restart

→ 46 files => OK

Other trials, from commands I found on the www:

sox BuxIn.wav BuxOut.wav silence 1 0.5 1% 1 5.0 1% : newfile : restart

→ 10 files

sox BuxIn.wav BuxOut.wav silence -l 1 0.0 -40d 1 1.0 -40d : newfile : restart

→ 125 files

No SoX

Sometimes, I also use NCH Slice Audio File Splitter (https://www.nch.com.au/splitter/index.html).
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback