Skip to content

Instantly share code, notes, and snippets.

@r9y9
Created September 13, 2017 06:57
Show Gist options
  • Save r9y9/2de42fce633b8e5e8b48e82a54993b96 to your computer and use it in GitHub Desktop.
Save r9y9/2de42fce633b8e5e8b48e82a54993b96 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
script_dir=$(cd $(dirname ${BASH_SOURCE:-$0}); pwd)
data_root=$script_dir/../data
cd $data_root
HTS_DEMO_ROOT=$1
DST_DIR=$data_root/"NIT-ATR503"
if [ -d $DST_DIR ]; then
echo "`basename $HTS_DEMO_ROOT` already copied"
exit 0
fi
mkdir -p $DST_DIR
# Full context Labels
if [ -d $DST_DIR/label_phone_align ]; then
rm -rf $DST_DIR/label_phone_align
fi
# 修正
echo $script_dir
echo $data_root
echo $HTS_DEMO_ROOT
echo $DST_DIR
ls -l $HTS_DEMO_ROOT
ls -l $DST_DIR
ls -l
echo cp -r $HTS_DEMO_ROOT/data/labels/full $DST_DIR/label_phone_align
ls -l $HTS_DEMO_ROOT/data/labels/
cp -r $HTS_DEMO_ROOT/data/labels/full $DST_DIR/label_phone_align
# Test full context labels
if [ -d $DST_DIR/test_label_phone_align ]; then
rm -rf $DST_DIR/test_label_phone_align
fi
cp -r $HTS_DEMO_ROOT/data/labels/gen $DST_DIR/test_label_phone_align
# Wav files
if [ -d $DST_DIR/wav ]; then
rm -rf $DST_DIR/wav
fi
cp -r $HTS_DEMO_ROOT/data/raw $DST_DIR/wav
cd $DST_DIR/wav
for f in *.raw
do
raw2wav -s 48.0 $f
rm -f $f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment