Ejemplo n.º 1
0
    def create(self):
        super(Align, self).create()

        # copy features scp files in the recipe_dir
        Features.export_features(
            self.feat_dir,
            os.path.join(self.recipe_dir, 'data', self.name))
Ejemplo n.º 2
0
    def create(self):
        super(AbstractAcousticModel, self).create()

        # copy features scp files in the recipe_dir
        Features.export_features(self.input_dir, self.data_dir)

        # create lang directory with L.fst
        lang = self.lang_args
        prepare_lang.prepare_lang(
            self.corpus,
            self.lang_dir,
            level=lang['level'],
            silence_probability=lang['silence_probability'],
            position_dependent_phones=lang['position_dependent_phones'],
            keep_tmp_dirs=lang['keep_tmp_dirs'],
            log=self.log)
Ejemplo n.º 3
0
def features2(corpus2, tmpdir_factory):
    """Return a directory with MFCC features computed from corpus2"""
    output_dir = str(tmpdir_factory.mktemp('features2'))
    feat = Features(corpus2, output_dir)
    feat.use_pitch = False
    feat.use_cmvn = True
    feat.delta_order = 0
    feat.compute()
    return output_dir