tomwalters@335: #!/bin/bash tomwalters@335: # Copyright 2009-2010 Thomas Walters tomwalters@335: # tomwalters@335: # Makes a copy of the cnbh syllables database in FLAC format found in tomwalters@335: # $SOUNDS_ROOT/cnbh-syllables. The database is uncompressed to .WAV format tomwalters@335: # for use with AIMCopy and HCopy. tomwalters@335: # The first command-line argument is the location of $SOUNDS_ROOT tomwalters@335: set -e tomwalters@335: set -u tomwalters@335: tomwalters@342: SOUNDS_ROOT=$1 tomwalters@335: tomwalters@344: if [ ! -e $SOUNDS_ROOT/clean/.make_clean_wavs_success ]; then tomwalters@335: mkdir -p $SOUNDS_ROOT/clean tomwalters@335: VOWELS="a e i o u" tomwalters@335: CONSONANTS="b d f g h k l m n p r s t v w x y z" tomwalters@335: for v in $VOWELS; do tomwalters@345: mkdir -p $SOUNDS_ROOT/clean/$v$v tomwalters@335: for c in $CONSONANTS; do tomwalters@345: mkdir -p $SOUNDS_ROOT/clean/$c$v tomwalters@345: mkdir -p $SOUNDS_ROOT/clean/$v$c tomwalters@335: done tomwalters@335: done tomwalters@335: CURRENT_DIR=`pwd` tomwalters@335: cd $SOUNDS_ROOT/cnbh-syllables/ tomwalters@335: for file in `find . -iname "*.flac"`; do tomwalters@346: sox $file ../clean/${file%flac}wav tomwalters@335: done tomwalters@335: touch $SOUNDS_ROOT/clean/.make_clean_wavs_success tomwalters@335: cd $CURRENT_DIR tomwalters@344: fi