normalize.sh 388 B

12345678910111213141516171819202122
  1. #!/bin/sh
  2. set -e
  3. OUTPUTDIR="6db-less"
  4. mkdir "$OUTPUTDIR"
  5. for i in *.wav; do
  6. cp -vi "$i" "${OUTPUTDIR}/${i}"
  7. normalize-audio -g -6db "${OUTPUTDIR}/${i}"
  8. done
  9. for i in *.ogg; do
  10. oggdec "$i" -o "${OUTPUTDIR}/${i%%.ogg}.wav"
  11. normalize-audio -g -6db "${OUTPUTDIR}/${i%%.ogg}.wav"
  12. oggenc "${OUTPUTDIR}/${i%%.ogg}.wav"
  13. rm "${OUTPUTDIR}/${i%%.ogg}.wav"
  14. done
  15. # EOF #