-
Notifications
You must be signed in to change notification settings - Fork 9
/
data_download.sh
executable file
·77 lines (65 loc) · 2.29 KB
/
data_download.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
# Copyright 2020 Nagoya University (Wen-Chin Huang)
# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
db=$1
# check arguments
if [ $# != 1 ]; then
echo "Usage: $0 <db_root_dir>"
exit 1
fi
srcspks=(
"SEF1" "SEF2" "SEM1" "SEM2"
)
trgspks_task1=(
"TEF1" "TEF2" "TEM1" "TEM2"
)
trgspks_task2=(
"TFF1" "TFM1" "TGF1" "TGM1" "TMF1" "TMM1"
)
# download dataset
cwd=`pwd`
if [ ! -e ${db}/.done ]; then
mkdir -p ${db}
cd ${db}
git clone https://github.com/nii-yamagishilab/VCC2020-database.git
cd VCC2020-database
unzip '*.zip'
rm -rf __MACOSX/ # remove extra folder
# integrate source waveforms
for srcspk in "${srcspks[@]}"; do
mv vcc2020_database_evaluation/${srcspk}/*.wav source/${srcspk}/
done
mv source/* ./
# integrate target waveforms
for trgspk in "${trgspks_task1[@]}"; do
mv vcc2020_database_groundtruth/${trgspk}/*.wav target_task1/${trgspk}/
done
#for trgspk in "${trgspks_task2[@]}"; do
# mv vcc2020_database_groundtruth/${trgspk}/*.wav target_task2/${trgspk}/
#done
mv target_task1/* ./
#mv target_task2/* ./
# move transcriptions
mkdir prompts
cat vcc2020_database_transcriptions/transcriptions_training/vcc2020_database_training_Eng_transcriptions.txt \
vcc2020_database_transcriptions/transcriptions_evaluation/vcc2020_database_evaluation_transcriptions.txt > prompts/Eng_transcriptions.txt
#mv vcc2020_database_transcriptions/transcriptions_training/vcc2020_database_training_Fin_transcriptions.txt prompts/Fin_transcriptions.txt
#mv vcc2020_database_transcriptions/transcriptions_training/vcc2020_database_training_Ger_transcriptions.txt prompts/Ger_transcriptions.txt
#mv vcc2020_database_transcriptions/transcriptions_training/vcc2020_database_training_Man_transcriptions.txt prompts/Man_transcriptions.txt
rm -rf vcc2020_database_transcriptions
# delete folders and files
rm -f *.zip
rm -rf source
rm -rf target_task1
rm -rf target_task2
rm -rf vcc2020_database_groundtruth/
rm -rf vcc2020_database_evaluation/
cd ..
mv VCC2020-database/* ./
rm -rf VCC2020-database
cd $cwd
echo "Successfully finished download."
touch ${db}/.done
else
echo "Already exists. Skip download."
fi