annotate experiments/scripts/cnbh-syllables/feature_generation/convert_flac_to_wav.sh @ 78:41640b18c99c

- AWS
author tomwalters
date Wed, 11 Aug 2010 23:54:37 +0000
parents fe63c7b2b7c3
children f75123cf39ce
rev   line source
tomwalters@54 1 #!/bin/bash
tomwalters@54 2 # Copyright 2009-2010 Thomas Walters <tom@acousticscale.org>
tomwalters@54 3 #
tomwalters@54 4 # Makes a copy of the cnbh syllables database in FLAC format found in
tomwalters@54 5 # $SOUNDS_ROOT/cnbh-syllables. The database is uncompressed to .WAV format
tomwalters@54 6 # for use with AIMCopy and HCopy.
tomwalters@54 7 # The first command-line argument is the location of $SOUNDS_ROOT
tomwalters@54 8 set -e
tomwalters@54 9 set -u
tomwalters@54 10
tomwalters@61 11 SOUNDS_ROOT=$1
tomwalters@54 12
tomwalters@63 13 if [ ! -e $SOUNDS_ROOT/clean/.make_clean_wavs_success ]; then
tomwalters@54 14 mkdir -p $SOUNDS_ROOT/clean
tomwalters@54 15 VOWELS="a e i o u"
tomwalters@54 16 CONSONANTS="b d f g h k l m n p r s t v w x y z"
tomwalters@54 17 for v in $VOWELS; do
tomwalters@64 18 mkdir -p $SOUNDS_ROOT/clean/$v$v
tomwalters@54 19 for c in $CONSONANTS; do
tomwalters@64 20 mkdir -p $SOUNDS_ROOT/clean/$c$v
tomwalters@64 21 mkdir -p $SOUNDS_ROOT/clean/$v$c
tomwalters@54 22 done
tomwalters@54 23 done
tomwalters@54 24 CURRENT_DIR=`pwd`
tomwalters@54 25 cd $SOUNDS_ROOT/cnbh-syllables/
tomwalters@54 26 for file in `find . -iname "*.flac"`; do
tomwalters@65 27 sox $file ../clean/${file%flac}wav
tomwalters@54 28 done
tomwalters@54 29 touch $SOUNDS_ROOT/clean/.make_clean_wavs_success
tomwalters@54 30 cd $CURRENT_DIR
tomwalters@63 31 fi