PretrainedAligner

class aligner.aligner.PretrainedAligner(corpus, dictionary, acoustic_model, align_config, output_directory, temp_directory=None, call_back=None, debug=False, verbose=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

align_config : AlignConfig

Configuration for alignment

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

align_directory
meta
model_directory

Methods

align([call_back])
compile_information(model_directory)
export_textgrids() Export a TextGrid file for every sound file in the dataset
setup()
export_textgrids()[source]

Export a TextGrid file for every sound file in the dataset