Skip to content

Instantly share code, notes, and snippets.

@jesusgollonet
Created November 23, 2010 18:57
Show Gist options
  • Save jesusgollonet/712293 to your computer and use it in GitHub Desktop.
Save jesusgollonet/712293 to your computer and use it in GitHub Desktop.
sox bits
# batch convert a directory of wav files to raw, downsampling to 22050 Hz
# the names will be .wav.raw
for i in `ls *.wav`; do echo -e "$i"; sox $i -r 22050 $i.raw; echo -e "$i.raw"; done
# downbitting
sox -b 24 a2.wav -r 22050 -b 16 a2.raw
#convert raw to raw, upsampling. the -s stands for signed and must be provided
for i in `ls *.raw`; do echo -e "$i"; sox -b 16 -r 22050 -s $i -r 44100 s-$i; echo -e "s-$i"; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment