I wanted to analyze 5 seconds of an audio file beginning from 50 seconds.
So I ran the following command:
sox audio.wav -n stat trim 50 5
But the output contained:
...
Length (seconds): 55.296000
...
But I expected only 5 seconds, not 55.
What did I do wrong? I thought that 50 was the start and 5 – the duration.
Best Answer
The effects function as a chain, so the
stat
effect feeds intotrim
, swap them around and it will work, e.g.: