-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare_data.sh
executable file
·50 lines (47 loc) · 1.61 KB
/
prepare_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
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# DOWNLOAD THE DATASET
# mkdir -p data
# pushd data
# if [ ! -d clean_trainset_wav_16k ]; then
# # Clean utterances
# if [ ! -f clean_trainset_wav.zip ]; then
# echo 'DOWNLOADING CLEAN DATASET...'
# wget http://datashare.is.ed.ac.uk/bitstream/handle/10283/1942/clean_trainset_wav.zip
# fi
# if [ ! -d clean_trainset_wav ]; then
# echo 'INFLATING CLEAN TRAINSET ZIP...'
# unzip -q clean_trainset_wav.zip -d clean_trainset_wav
# fi
# if [ ! -d clean_trainset_wav_16k ]; then
# echo 'CONVERTING CLEAN WAVS TO 16K...'
# mkdir -p clean_trainset_wav_16k
# pushd clean_trainset_wav
# ls *.wav | while read name; do
# sox $name -r 16k ../clean_trainset_wav_16k/$name
# done
# popd
# fi
# fi
# if [ ! -d noisy_trainset_wav_16k ]; then
# # Noisy utterances
# if [ ! -f noisy_trainset_wav.zip ]; then
# echo 'DOWNLOADING NOISY DATASET...'
# wget http://datashare.is.ed.ac.uk/bitstream/handle/10283/1942/noisy_trainset_wav.zip
# fi
# if [ ! -d noisy_trainset_wav ]; then
# echo 'INFLATING NOISY TRAINSET ZIP...'
# unzip -q noisy_trainset_wav.zip -d noisy_trainset_wav
# fi
# if [ ! -d noisy_trainset_wav_16k ]; then
# echo 'CONVERTING NOISY WAVS TO 16K...'
# mkdir -p noisy_trainset_wav_16k
# pushd noisy_trainset_wav
# ls *.wav | while read name; do
# sox $name -r 16k ../noisy_trainset_wav_16k/$name
# done
# popd
# fi
# fi
# popd
echo 'PREPARING TRAINING DATA...'
python make_tfrecords.py --force-gen