linuxbashshellaudiosox

How to get audio length for all audios using sox?


I can do soxi -d * to get audio length information in hours, minutes, and seconds.

However it would only give me info on the individual audio length.

If I wanted to see the audio length for the entire folder, how can I accomplish such task?

like when you do "wc -w" it shows the sum of everything at the end. Is there a flag or something I can integrate with soxi?


Solution

  • soxi -T *

    from the man file

    -T Used with multiple files; changes the behaviour of -s, -d and -D to display the total across all given files. Note that when used with -s with files > with different sampling rates, this is of questionable value.