forked from gooofy/zamia-speech
-
Notifications
You must be signed in to change notification settings - Fork 0
/
speech_dist.sh
executable file
·199 lines (143 loc) · 5.61 KB
/
speech_dist.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#!/bin/bash
DISTDIR=data/dist
rm -rf $DISTDIR
mkdir $DISTDIR
datum=`date +%Y%m%d`
#
# kaldi nnet3 models de
#
AMNAME="kaldi-nnet3-voxforge-de-r$datum"
mkdir "$DISTDIR/$AMNAME"
function export_kaldi_nnet3 {
EXPNAME=$1
GRAPHNAME=$2
mkdir "$DISTDIR/$AMNAME/$EXPNAME"
cp data/dst/speech/de/kaldi/exp/nnet3/$EXPNAME/final.mdl $DISTDIR/$AMNAME/$EXPNAME/
cp data/dst/speech/de/kaldi/exp/nnet3/$EXPNAME/cmvn_opts $DISTDIR/$AMNAME/$EXPNAME/ 2>/dev/null
cp data/dst/speech/de/kaldi/exp/nnet3/$GRAPHNAME/HCLG.fst $DISTDIR/$AMNAME/$EXPNAME/
cp data/dst/speech/de/kaldi/exp/nnet3/$GRAPHNAME/words.txt $DISTDIR/$AMNAME/$EXPNAME/
cp data/dst/speech/de/kaldi/exp/nnet3/$GRAPHNAME/num_pdfs $DISTDIR/$AMNAME/$EXPNAME/
}
export_kaldi_nnet3 nnet_tdnn_a nnet_tdnn_a/graph
# export_kaldi_nnet3 lstm_ld5 lstm_ld5/graph
mkdir "$DISTDIR/$AMNAME/extractor"
cp data/dst/speech/de/kaldi/exp/nnet3/extractor/final.mat "$DISTDIR/$AMNAME/extractor/"
cp data/dst/speech/de/kaldi/exp/nnet3/extractor/global_cmvn.stats "$DISTDIR/$AMNAME/extractor/"
cp data/dst/speech/de/kaldi/exp/nnet3/extractor/final.dubm "$DISTDIR/$AMNAME/extractor/"
cp data/dst/speech/de/kaldi/exp/nnet3/extractor/final.ie "$DISTDIR/$AMNAME/extractor/"
cp data/dst/speech/de/kaldi/exp/nnet3/extractor/splice_opts "$DISTDIR/$AMNAME/extractor/"
cp data/dst/speech/de/kaldi/exp/nnet3/ivectors_test/conf/splice.conf "$DISTDIR/$AMNAME/extractor/"
cp data/dst/speech/de/kaldi/RESULTS.txt $DISTDIR/$AMNAME/
cp README.md "$DISTDIR/$AMNAME"
cp LICENSE "$DISTDIR/$AMNAME"
cp AUTHORS "$DISTDIR/$AMNAME"
mkdir "$DISTDIR/$AMNAME/conf"
cp data/src/speech/kaldi-mfcc.conf $DISTDIR/$AMNAME/conf/mfcc.conf
cp data/src/speech/kaldi-mfcc-hires.conf $DISTDIR/$AMNAME/conf/mfcc-hires.conf
cp data/src/speech/kaldi-online-cmvn.conf $DISTDIR/$AMNAME/conf/online_cmvn.conf
pushd $DISTDIR
tar cfv "$AMNAME.tar" $AMNAME
xz -v -8 -T 12 "$AMNAME.tar"
popd
rm -r "$DISTDIR/$AMNAME"
#
# kaldi gmm models de
#
AMNAME="kaldi-gmm-voxforge-de-r$datum"
mkdir "$DISTDIR/$AMNAME"
function export_kaldi_model {
EXPNAME=$1
GRAPHNAME=$2
mkdir "$DISTDIR/$AMNAME/$EXPNAME"
cp data/dst/speech/de/kaldi/exp/$EXPNAME/final.mdl $DISTDIR/$AMNAME/$EXPNAME/
cp data/dst/speech/de/kaldi/exp/$EXPNAME/final.mat $DISTDIR/$AMNAME/$EXPNAME/
cp data/dst/speech/de/kaldi/exp/$EXPNAME/splice_opts $DISTDIR/$AMNAME/$EXPNAME/ 2>/dev/null
cp data/dst/speech/de/kaldi/exp/$EXPNAME/cmvn_opts $DISTDIR/$AMNAME/$EXPNAME/ 2>/dev/null
cp data/dst/speech/de/kaldi/exp/$EXPNAME/delta_opts $DISTDIR/$AMNAME/$EXPNAME/ 2>/dev/null
cp data/dst/speech/de/kaldi/exp/$GRAPHNAME/HCLG.fst $DISTDIR/$AMNAME/$EXPNAME/
cp data/dst/speech/de/kaldi/exp/$GRAPHNAME/words.txt $DISTDIR/$AMNAME/$EXPNAME/
cp data/dst/speech/de/kaldi/exp/$GRAPHNAME/num_pdfs $DISTDIR/$AMNAME/$EXPNAME/
}
# export_kaldi_model tri2b tri2b/graph
export_kaldi_model tri2b_mmi tri2b_denlats/dengraph
export_kaldi_model tri2b_mmi_b0.05 tri2b_denlats/dengraph
export_kaldi_model tri2b_mpe tri2b_denlats/dengraph
# export_kaldi_model tri3b tri3b/graph
export_kaldi_model tri3b_mpe tri3b_denlats/dengraph
export_kaldi_model tri3b_mmi tri3b_denlats/dengraph
export_kaldi_model tri3b_mmi_b0.05 tri3b_denlats/dengraph
cp data/dst/speech/de/kaldi/RESULTS.txt $DISTDIR/$AMNAME/
cp README.md "$DISTDIR/$AMNAME"
cp LICENSE "$DISTDIR/$AMNAME"
cp AUTHORS "$DISTDIR/$AMNAME"
mkdir "$DISTDIR/$AMNAME/conf"
cp data/src/speech/kaldi-mfcc.conf $DISTDIR/$AMNAME/conf/mfcc.conf
cp data/src/speech/kaldi-mfcc-hires.conf $DISTDIR/$AMNAME/conf/mfcc-hires.conf
cp data/src/speech/kaldi-online-cmvn.conf $DISTDIR/$AMNAME/conf/online_cmvn.conf
pushd $DISTDIR
tar cfv "$AMNAME.tar" $AMNAME
xz -v -8 -T 12 "$AMNAME.tar"
popd
rm -r "$DISTDIR/$AMNAME"
#
# cont sphinx model de
#
AMNAME="cmusphinx-cont-voxforge-de-r$datum"
mkdir "$DISTDIR/$AMNAME"
mkdir "$DISTDIR/$AMNAME/model_parameters"
cp -r data/dst/speech/de/cmusphinx_cont/model_parameters/voxforge.cd_cont_6000 "$DISTDIR/$AMNAME/model_parameters"
cp -r data/dst/speech/de/cmusphinx_cont/etc "$DISTDIR/$AMNAME"
cp data/dst/speech/de/cmusphinx_cont/voxforge.html "$DISTDIR/$AMNAME"
cp README.md "$DISTDIR/$AMNAME"
cp LICENSE "$DISTDIR/$AMNAME"
cp AUTHORS "$DISTDIR/$AMNAME"
pushd $DISTDIR
tar cfv "$AMNAME.tar" $AMNAME
xz -v -8 -T 12 "$AMNAME.tar"
popd
rm -r "$DISTDIR/$AMNAME"
#
# ptm sphinx model de
#
AMNAME="cmusphinx-ptm-voxforge-de-r$datum"
mkdir "$DISTDIR/$AMNAME"
mkdir "$DISTDIR/$AMNAME/model_parameters"
cp -r data/dst/speech/de/cmusphinx_ptm/model_parameters/voxforge.cd_ptm_5000 "$DISTDIR/$AMNAME/model_parameters"
cp -r data/dst/speech/de/cmusphinx_ptm/etc "$DISTDIR/$AMNAME"
cp data/dst/speech/de/cmusphinx_ptm/voxforge.html "$DISTDIR/$AMNAME"
cp README.md "$DISTDIR/$AMNAME"
cp LICENSE "$DISTDIR/$AMNAME"
cp AUTHORS "$DISTDIR/$AMNAME"
pushd $DISTDIR
tar cfv "$AMNAME.tar" $AMNAME
xz -v -8 -T 12 "$AMNAME.tar"
popd
rm -r "$DISTDIR/$AMNAME"
#
# srilm de
#
LMNAME="srilm-voxforge-de-r$datum.arpa"
cp data/dst/speech/de/srilm/lm.arpa data/dist/$LMNAME
gzip data/dist/$LMNAME
#
# cmuclmtk de
#
# LMNAME="cmuclmtk-voxforge-de-r$datum.arpa"
# cp data/dst/speech/de/cmusphinx_cont/voxforge.arpa $DISTDIR/$LMNAME
# gzip $DISTDIR/$LMNAME
#
# sequitur de
#
MODELNAME="sequitur-voxforge-de-r$datum"
cp data/dst/speech/de/sequitur/model-6 $DISTDIR/$MODELNAME
gzip $DISTDIR/$MODELNAME
#
# copyright info
#
cp README.md "$DISTDIR"
cp LICENSE "$DISTDIR"
cp AUTHORS "$DISTDIR"
#
# upload
#
echo rsync -avPz --delete --bwlimit=256 data/dist goofy:/var/www/html/voxforge/de