I have a bunch of audio files and I would like to create the spectrogram for each individual file using Sox. Usually, for a single file, I do this:
sox audiofile.flac -n spectrogram
However I don't know how to extend this method to more than one file. Ideally I would like my output .png
file to have a filename associated to its respective audio file; for example audiofile1.png
for audiofile1.flac
, audiofile2.png
for audiofile2.flac
and so on.
Does anybody know how to do this?
Best Answer
Thanks to Joseph for his answer. Perhaps it worked at the time of his posting but I had to add
-o
just afterspectrogram
for sox to accept the command.I'll be whacking them all in their own folder for archiving.
You could even go a bit further by adding the title of the file above the spectrogram within the image, and making it a little wider to see more details. The default image is a bit small for me.