2
0

m4a-to-wav.sh 379 B

12345678
  1. for file in *.m4a; do name=`echo $file | sed "s/\ /\_/g" | sed "s/.m4a//"`; \
  2. echo "Convert m4a $file to $name.wav"; faad -o $name.wav "$file" > /dev/null 2>&1; \
  3. for rate in 8000 16000 32000 48000; do mkdir -p $rate; \
  4. echo "Creating $rate kHz -> $rate/$name.wav"; \
  5. sox $name.wav -c 1 -r $rate $rate/$name.wav vol 0.06; \
  6. done; \
  7. rm -f *.wav; \
  8. done;