Job#

class montreal_forced_aligner.db.Job(**kwargs)[source]#

Bases: Base

Database class for storing information about multiprocessing jobs

Parameters:
  • id (int) – Primary key

  • corpus_id (int) – Foreign key to Corpus

  • corpus (Corpus) – Corpus

  • utterances (list[Utterance]) – Utterances associated with the job

  • symbols (list[M2M2Job]) – Symbols associated with the job in training phonetisaurus models

  • words (list[Word2Job]) – Words associated with the job in training phonetisaurus models

construct_dictionary_dependent_paths(directory, identifier, extension)[source]#

Helper function for constructing paths that depend only on the dictionaries of the job, and not the job name itself. These paths should be merged with all other jobs to get a full set of dictionary paths. :param directory: Directory to use as the root :type directory: Path :param identifier: Identifier for the path name, like ali or acc :type identifier: str :param extension: Extension of the path, like .scp or .ark :type extension: str

Returns:

Path for each dictionary

Return type:

dict[int, Path]

construct_path(directory, identifier, extension, dictionary_id=None)[source]#

Helper function for constructing dictionary-dependent paths for the Job

Parameters:
  • directory (str) – Directory to use as the root

  • identifier (str) – Identifier for the path name, like ali or acc

  • extension (str) – Extension of the path, like scp or ark

  • dictionary_id (int, optional) – Dictionary ID to construct path for

Returns:

Path

Return type:

Path