# sort-wav-pairs Given two directories of audio files with random names, give the ability to drag them into the correct order, then save the order, and eventually rename them. ## Preparing the data Normalize all audio files and convert to wav: ``` pip install ffmpeg-normalize # assuming your files are 'raw/{speaker}/*.aif'... mkdir -p normalized for d in raw/* do dir=${d/raw/normalized} echo $dir mkdir -p $dir cd $d for i in *.aif do o=${i/aif/wav} echo "../../$dir/$o" ffmpeg-normalize -o "../../$dir/$o" -v "$i" done cd ../.. done ``` Move the normalized folder to './public/data' in this repo. - button to SAVE the order - load stored json - load json and copy all the files