Пример #1
0
                join(exper_path, 'acoustic_model', 'data', 'wav'),
                l_file_tokns, acoustic_feats_path, d_mp_opts)
        else:
            for file_name_token in l_file_tokns:
                feat_extraction(
                    join(exper_path, 'acoustic_model', 'data', 'wav'),
                    file_name_token, acoustic_feats_path, d_mp_opts)

    # Labels Conversion to Variable Frame Rate:------------------------------------------------
    if b_conv_labs_rate and not d_mp_opts[
            'b_const_rate']:  # NOTE: The script ./script/label_st_align_to_var_rate.py can be also called from comand line directly.
        label_state_align = join(exper_path, 'acoustic_model', 'data',
                                 'label_state_align')
        label_state_align_var_rate = pars_acous_train['Labels']['label_align']
        fs = int(pars_acous_train['Waveform']['samplerate'])
        ltvr.convert(file_id_list, label_state_align, acoustic_feats_path, fs,
                     label_state_align_var_rate)

    # Run duration training:-------------------------------------------------------------------
    if b_dur_train:
        call([
            submit_path, run_merlin_path,
            join(dur_model_conf_path, 'dur_train.conf')
        ])

    # Run acoustic train:----------------------------------------------------------------------
    if b_acous_train:
        call([
            submit_path, run_merlin_path,
            join(acous_model_conf_path, 'acous_train.conf')
        ])
Пример #2
0
    if b_feat_extr:
        # Extract features:
        lu.mkdir(acoustic_feats_path)

        if b_feat_ext_multiproc:
            lu.run_multithreaded(feat_extraction, join(exper_path, 'acoustic_model', 'data', 'wav'), l_file_tokns, acoustic_feats_path, d_mp_opts)
        else:
            for file_name_token in l_file_tokns:
                feat_extraction(join(exper_path, 'acoustic_model', 'data', 'wav'), file_name_token, acoustic_feats_path, d_mp_opts)

    # Labels Conversion to Variable Frame Rate:------------------------------------------------
    if b_conv_labs_rate and not d_mp_opts['b_const_rate']: # NOTE: The script ./script/label_st_align_to_var_rate.py can be also called from comand line directly.
        label_state_align = join(exper_path, 'acoustic_model', 'data', 'label_state_align')
        label_state_align_var_rate = pars_acous_train['Labels']['label_align']
        fs = int(pars_acous_train['Waveform']['samplerate'])
        ltvr.convert(file_id_list,label_state_align, acoustic_feats_path, fs, label_state_align_var_rate)

    # Run duration training:-------------------------------------------------------------------
    if b_dur_train:
        call([submit_path, run_merlin_path, join(dur_model_conf_path, 'dur_train.conf')])

    # Run acoustic train:----------------------------------------------------------------------
    if b_acous_train:
        call([submit_path,run_merlin_path, join(acous_model_conf_path, 'acous_train.conf')])

    # Run duration syn:------------------------------------------------------------------------
    if b_dur_syn:
        call([submit_path, run_merlin_path, join(dur_model_conf_path, 'dur_synth.conf')])

    # Run acoustic synth:----------------------------------------------------------------------
    if b_acous_syn: