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