TrainableAligner

class aligner.aligner.TrainableAligner(corpus, dictionary, output_directory, temp_directory=None, num_jobs=3, call_back=None, mono_params=None, tri_params=None, tri_fmllr_params=None, debug=False)[source]

Aligner that aligns and trains acoustics models on a large dataset

Parameters:

corpus : Corpus

Corpus object for the dataset

dictionary : Dictionary

Dictionary object for the pronunciation dictionary

output_directory : str

Path to export aligned 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

mono_params : MonophoneConfig, optional

Monophone training parameters to use, if different from defaults

tri_params : TriphoneConfig, optional

Triphone training parameters to use, if different from defaults

tri_fmllr_params : TriphoneFmllrConfig, optional

Speaker-adapted triphone training parameters to use, if different from defaults

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

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
save(path) Output an acoustic model and dictionary to the specified path
setup()
train_mono() Perform monophone training
train_tri() Perform triphone training
train_tri_fmllr() Perform speaker-adapted triphone training
save(path)[source]

Output an acoustic model and dictionary to the specified path

Parameters:

path : str

Path to save acoustic model and dictionary

train_mono()[source]

Perform monophone training

train_tri()[source]

Perform triphone training