PretrainedAligner

class aligner.aligner.PretrainedAligner(corpus, dictionary, acoustic_model, output_directory, beam=100, temp_directory=None, num_jobs=3, speaker_independent=False, call_back=None, debug=False, skip_input=False)[source]

Class for aligning a dataset using a pretrained acoustic model

Parameters:
corpusCorpus

Corpus object for the dataset

dictionaryDictionary

Dictionary object for the pronunciation dictionary

acoustic_modelAcousticModel

Archive containing the acoustic model and pronunciation dictionary

output_directorystr

Path to directory to save TextGrids

temp_directorystr, optional

Specifies the temporary directory root to save files need for Kaldi. If not specified, it will be set to ~/Documents/MFA

num_jobsint, optional

Number of processes to use, defaults to 3

call_backcallable, optional

Specifies a call back function for alignment

Attributes

meta

mono_ali_directory

mono_directory

mono_final_model_path

tri_ali_directory

tri_directory

tri_final_model_path

tri_fmllr_ali_directory

tri_fmllr_directory

tri_fmllr_final_model_path

Methods

do_align()

Perform alignment while calculating speaker transforms (fMLLR estimation)

export_textgrids()

Export a TextGrid file for every sound file in the dataset

get_num_gauss_mono()

Get the number of gaussians for a monophone model

parse_log_directory(directory, iteration)

Parse error files and relate relevant information about unaligned files

setup()

test_utterance_transcriptions()

train_tri_fmllr()

Perform speaker-adapted triphone training