AlignmentExtractionFunction#

class montreal_forced_aligner.alignment.multiprocessing.AlignmentExtractionFunction(args)[source]#

Bases: KaldiFunction

Multiprocessing function to collect phone alignments from the aligned lattice

See also

CorpusAligner.collect_alignments

Main function that calls this function in parallel

CorpusAligner.alignment_extraction_arguments

Job method for generating arguments for this function

latbin/linear-to-nbest.cc

Relevant Kaldi binary

latbin/lattice-determinize-pruned.cc

Relevant Kaldi binary

latbin/lattice-align-words.cc

Relevant Kaldi binary

latbin/lattice-to-phone-lattice.cc

Relevant Kaldi binary

latbin/nbest-to-ctm.cc

Relevant Kaldi binary

get_train_ctm.sh

Reference Kaldi script

Parameters:

args (AlignmentExtractionArguments) – Arguments for the function

cleanup_g2p_intervals(utterance_name, intervals)[source]#

Clean up phone intervals to remove silence

Parameters:
  • utterance_name (str) – Name of the current utterance

  • intervals (list[CtmInterval]) – Intervals to process

Returns:

Cleaned up intervals

Return type:

list[CtmInterval]

cleanup_intervals(utterance_name, intervals)[source]#

Clean up phone intervals to remove silence

Parameters:

intervals (list[CtmInterval]) – Intervals to process

Returns:

Cleaned up intervals

Return type:

list[CtmInterval]