Mercurial > hg > aimc
annotate trunk/experiments/scripts/cnbh-syllables/feature_generation/convert_flac_to_wav.sh @ 420:733a11a65f3d
- Allow processing without re-initialization.
author | tom@acousticscale.org |
---|---|
date | Tue, 26 Oct 2010 04:48:56 +0000 |
parents | d8255e3cc139 |
children |
rev | line source |
---|---|
tomwalters@335 | 1 #!/bin/bash |
tomwalters@335 | 2 # Copyright 2009-2010 Thomas Walters <tom@acousticscale.org> |
tomwalters@335 | 3 # |
tomwalters@335 | 4 # Makes a copy of the cnbh syllables database in FLAC format found in |
tomwalters@335 | 5 # $SOUNDS_ROOT/cnbh-syllables. The database is uncompressed to .WAV format |
tomwalters@335 | 6 # for use with AIMCopy and HCopy. |
tomwalters@335 | 7 # The first command-line argument is the location of $SOUNDS_ROOT |
tomwalters@335 | 8 set -e |
tomwalters@335 | 9 set -u |
tomwalters@335 | 10 |
tomwalters@342 | 11 SOUNDS_ROOT=$1 |
tomwalters@335 | 12 |
tomwalters@344 | 13 if [ ! -e $SOUNDS_ROOT/clean/.make_clean_wavs_success ]; then |
tomwalters@335 | 14 mkdir -p $SOUNDS_ROOT/clean |
tomwalters@335 | 15 VOWELS="a e i o u" |
tomwalters@335 | 16 CONSONANTS="b d f g h k l m n p r s t v w x y z" |
tomwalters@335 | 17 for v in $VOWELS; do |
tomwalters@345 | 18 mkdir -p $SOUNDS_ROOT/clean/$v$v |
tomwalters@335 | 19 for c in $CONSONANTS; do |
tomwalters@345 | 20 mkdir -p $SOUNDS_ROOT/clean/$c$v |
tomwalters@345 | 21 mkdir -p $SOUNDS_ROOT/clean/$v$c |
tomwalters@335 | 22 done |
tomwalters@335 | 23 done |
tomwalters@335 | 24 CURRENT_DIR=`pwd` |
tomwalters@335 | 25 cd $SOUNDS_ROOT/cnbh-syllables/ |
tomwalters@335 | 26 for file in `find . -iname "*.flac"`; do |
tomwalters@346 | 27 sox $file ../clean/${file%flac}wav |
tomwalters@335 | 28 done |
tomwalters@335 | 29 touch $SOUNDS_ROOT/clean/.make_clean_wavs_success |
tomwalters@335 | 30 cd $CURRENT_DIR |
tomwalters@344 | 31 fi |