You need to sign in or sign up before continuing.
prepare_dataset.sh 704 字节
Newer Older
H
Hui Zhang 已提交
1
#!/bin/bash
F
Feiyu Chan 已提交
2 3 4

exp_dir="exp"
data_dir="data"
H
Hui Zhang 已提交
5

F
Feiyu Chan 已提交
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
source ${MAIN_ROOT}/utils/parse_options.sh || exit -1

archive=${data_dir}/"BZNSYP.rar"
if [ ! -f ${archive} ]; then
    echo "Baker Dataset not found! Download it first to the data_dir."
    exit -1
fi

MD5='c4350563bf7dc298f7dd364b2607be83'
md5_result=$(md5sum ${archive} | awk -F[' '] '{print $1}')
if [ ${md5_result} != ${MD5} ]; then
    echo "MD5 mismatch! The Archive has been changed."
    exit -1
fi

H
Hui Zhang 已提交
21

F
Feiyu Chan 已提交
22 23 24 25 26 27 28 29 30 31 32 33
label_file='ProsodyLabeling/000001-010000.txt'
filename='000001-010000.txt'
unrar e ${archive} ${label_file}
cp ${filename} ${exp_dir}
rm -f ${filename}

if [ ! -f ${exp_dir}/${filename} ];then
    echo "File extraction failed!"
    exit
fi

exit 0