def _train_hierarchy(self, hierarchy):
"""Trains a hierarchy (quin-, tri- or single-phones).
This helper method fits a GMM for all phones of one hierarchy.
:param hierarchy: all phones of one hierarchy
:returns: fitted GMMs for the given hierarchy
"""
output = dict.fromkeys(hierarchy.keys())
for k in output.keys():
gm = GaussianMixture()
gm.fit(hierarchy[k])
output[k] = gm
print('Fitted {:s}'.format(''.join(str(k))))
return output
评论列表
文章目录