Commit 808919ea authored by Anthony Larcher's avatar Anthony Larcher
Browse files
parents d8554f63 85c0f1ff
......@@ -215,7 +215,7 @@ class FeaturesServer(object):
# Perform RASTA filtering if required
if self.rasta:
feat, label = self._rasta(feat, label)
# Add temporal context
if self.delta or self.double_delta:
feat = self._delta_and_2delta(feat)
......@@ -223,7 +223,7 @@ class FeaturesServer(object):
feat = pca_dct(feat, self.dct_pca_config[0], self.dct_pca_config[1], self.dct_pca_config[2])
elif self.sdc:
feat = shifted_delta_cepstral(feat, d=self.sdc_config[0], p=self.sdc_config[1], k=self.sdc_config[2])
# Smooth the labels and fuse the channels if more than one.
logging.debug('Smooth the labels and fuse the channels if more than one')
label = label_fusion(label)
......@@ -239,7 +239,7 @@ class FeaturesServer(object):
logging.debug('no keep all')
feat = feat[label]
label = label[label]
return feat, label
def _mask(self, cep):
......@@ -487,8 +487,6 @@ class FeaturesServer(object):
feat, label = self.post_processing(feat, label, global_mean, global_std)
else:
feat, label = self.post_processing(feat, label)
if self.mask is not None:
feat = feat[:, self.mask]
return feat, label
......
......@@ -659,8 +659,7 @@ class StatServer:
# Compute 0th-order statistics
self.stat0[idx, :] = pp.sum(0)
# Compute 1st-order statistics
self.stat1[idx, :] = numpy.reshape(numpy.transpose(
numpy.dot(data.transpose(), pp)), ubm.sv_size()).astype(STAT_TYPE)
self.stat1[idx, :] = numpy.reshape(numpy.transpose(numpy.dot(data.transpose(), pp)), ubm.sv_size()).astype(STAT_TYPE)
def get_mean_stat1(self):
"""Return the mean of first order statistics
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment