I am trying to familiarize myself with sox to do some audio processing tasks. Ultimately, I want to take all my WAV files and extract just one channel, and save them, ideally with a modified name (e.g. input 55_55.wav would become left_55_55.wav). Right, now, though I'm just trying some basic stuff and encountering problems.
For example, looking at the duration of just one file works fine:
sox --i -D 55_55.wav 10.840000
But trying to run the command on all the .wav files in the directory doesn't work out:
sox --i -D *.wav sox FAIL formats: can't open input file '*.wav': Invalid argument
What's going wrong here?
I tried several variations (e.g.
./*.wav and changing the relative location of
*.wav) but haven't been able to solve it. I'm hoping to figure out how to do something to every .wav file in order to accomplish my goal, and it seems like using
*.wav for the input could be the right approach, but it's not working out so well. Any thoughts?
I thought something like the following lie would work out to extract one channel from every file and save that one channel with a modified name, but it seems I was a little too hopeful:
sox *.wav -c 1 left*.wav remix 1 0 sox FAIL formats: can't open output file `left*.wav`: Invalid argument