Created
February 7, 2018 19:55
-
-
Save leonmak/725ae49a7aa750d0f2962eefcd7832e5 to your computer and use it in GitHub Desktop.
Convert format of all audio files in folder with sox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
outputdir="../audio-8k" | |
mkdir -p $outputdir | |
for file in **/*.wav | |
do | |
filename=$(basename $file) | |
dir=$(dirname $file) | |
echo $dir | |
outputfile="${outputdir}/${file}" | |
mkdir -p $(dirname $outputfile) | |
sox $file -r 8000 $outputfile | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment