Skip to content

Instantly share code, notes, and snippets.

@fstamour
Created September 14, 2014 19:01
Show Gist options
  • Save fstamour/286f2160b2bef90dd107 to your computer and use it in GitHub Desktop.
Save fstamour/286f2160b2bef90dd107 to your computer and use it in GitHub Desktop.
Batch conversion, WAV to ULAW
#!/bin/bash
#
# Not perfect, but does the job pretty well.
#
for file in `ls -1 *.wav`
do
outfile=`echo $file | /bin/sed 's/\(.*\)\..*/\1/'`.ulaw
echo "Converting $file to $outfile"
sox -V $file -r 8000 -c 1 -t ul $outfile
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment