-
Notifications
You must be signed in to change notification settings - Fork 1
/
import_LibriSpeech.sh
executable file
·68 lines (58 loc) · 1.55 KB
/
import_LibriSpeech.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
#!/bin/bash
cd data
mkdir LibriSpeech
cd LibriSpeech
echo "####### importing dev-clean"
wget http://www.openslr.org/resources/12/dev-clean.tar.gz
tar -xzvf dev-clean.tar.gz
mv LibriSpeech/* .
rm dev-clean.tar.gz
rm -r LibriSpeech
# move to top level dir and convert using sox
cd dev-clean
find . -name "*.flac" -exec mv {} . \;
find . -maxdepth 1 -type d -exec rm -r {} \;
for f in *.flac
do
echo $f
sox $f -r 16000 -b 16 "${f%.flac}.wav"
done
find . -name "*.flac" -exec rm -f {} \;
cp ../../LibriSpeech_phoneme_csv_files/dev.csv .
cd ..
echo "####### importing test-clean"
wget http://www.openslr.org/resources/12/test-clean.tar.gz
tar -xzvf test-clean.tar.gz
mv LibriSpeech/* .
rm test-clean.tar.gz
rm -r LibriSpeech
# move to top level dir and convert using sox
cd test-clean
find . -name "*.flac" -exec mv {} . \;
find . -maxdepth 1 -type d -exec rm -r {} \;
for f in *.flac
do
echo $f
sox $f -r 16000 -b 16 "${f%.flac}.wav"
done
find . -name "*.flac" -exec rm -f {} \;
cp ../../LibriSpeech_phoneme_csv_files/test.csv .
cd ..
echo "####### importing train-clean-100"
wget http://www.openslr.org/resources/12/train-clean-100.tar.gz
tar -xzvf train-clean-100.tar.gz
mv LibriSpeech/* .
rm train-clean-100.tar.gz
rm -r LibriSpeech
# move to top level dir and convert using sox
cd train-clean-100
find . -name "*.flac" -exec mv {} . \;
find . -maxdepth 1 -type d -exec rm -r {} \;
for f in *.flac
do
echo $f
sox $f -r 16000 -b 16 "${f%.flac}.wav"
done
find . -name "*.flac" -exec rm -f {} \;
cp ../../LibriSpeech_phoneme_csv_files/train.csv .
cd ..