PretrainedAligner

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

Class for aligning a dataset using a pretrained acoustic model

Parameters:

corpus : Corpus

Corpus object for the dataset

dictionary : Dictionary

Dictionary object for the pronunciation dictionary

acoustic_model : AcousticModel

Archive containing the acoustic model and pronunciation dictionary

output_directory : str

Path to directory to save TextGrids

temp_directory : str, optional

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

num_jobs : int, optional

Number of processes to use, defaults to 3

call_back : callable, 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()
do_align()[source]

Perform alignment while calculating speaker transforms (fMLLR estimation)

export_textgrids()[source]

Export a TextGrid file for every sound file in the dataset