TrainableAligner

class montreal_forced_aligner.aligner.TrainableAligner(corpus, dictionary, training_config, align_config, temp_directory=None, call_back=None, debug=False, verbose=False, logger=None, pretrained_aligner=None)[source]

Aligner that aligns and trains acoustics models on a large dataset

Parameters:
corpus : AlignableCorpus

Corpus object for the dataset

dictionary : Dictionary

Dictionary object for the pronunciation dictionary

training_config : TrainingConfig

Configuration to train a model

align_config : AlignConfig

Configuration for alignment

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

call_back : callable, optional

Specifies a call back function for alignment

Attributes

meta
use_mp

Methods

compile_information(model_directory, …)
dictionaries_for_job(job_name)
export_textgrids(output_directory) Export a TextGrid file for every sound file in the dataset
save(path[, root_directory]) Output an acoustic model and dictionary to the specified path
setup()
train()
export_textgrids(output_directory)[source]

Export a TextGrid file for every sound file in the dataset

save(path, root_directory=None)[source]

Output an acoustic model and dictionary to the specified path

Parameters:
path : str

Path to save acoustic model and dictionary

root_directory : str or None

Path for root directory of temporary files