-
Notifications
You must be signed in to change notification settings - Fork 75
/
data.sh
38 lines (30 loc) · 830 Bytes
/
data.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
set -e
set -u
mkdir -p data/local
cwd=$(pwd)
cd data/local
if [ ! -f .completed ]; then
# download data
[ ! -f yesno.tar.gz ] &&
wget https://www.openslr.org/resources/1/waves_yesno.tar.gz -O yesno.tar.gz
# check downloaded file
[ "$(md5sum yesno.tar.gz | awk '{print $1}')" != "962ff6e904d2df1126132ecec6978786" ] && (
echo "MD5SUM check failed for yesno.tar.gz, please rm it then re-run the script."
exit 1
)
# untar
tar -zxf yesno.tar.gz
touch .completed
else
echo "Found previous processed data. Skip download"
fi
cd $cwd
[ ! $(command -v python) ] && (
echo "No python executable found in PATH"
exit 1
)
python local/extract_feat.py data/local/waves_yesno/
echo "FBank spectrum generate done."
python utils/data/resolvedata.py
echo "$0 done"
exit 0