PronunciationProbabilityTrainer#

class montreal_forced_aligner.acoustic_modeling.PronunciationProbabilityTrainer(previous_trainer=None, silence_probabilities=True, train_g2p=False, use_phonetisaurus=False, num_iterations=10, model_size=100000, **kwargs)[source]#

Bases: AcousticModelTrainingMixin, PyniniTrainerMixin

Class for training pronunciation probabilities based off of alignment pronunciations

Parameters:
  • previous_trainer (AcousticModelTrainingMixin) – Previous trainer in the training configuration

  • silence_probabilities (bool) – Flag for whether to save silence probabilities

align_g2p(output_path=None)[source]#

Runs the entire alignment regimen.

property alignment_model_path#

Alignment model path

compute_calculated_properties()[source]#

Compute calculated properties

export_model(output_model_path)[source]#

Export an acoustic model to the specified path

Parameters:

output_model_path (str) – Path to save acoustic model

property exported_model_path#

Path to exported acoustic model

generate_pronunciations_arguments()[source]#

Generate Job arguments for GeneratePronunciationsFunction

Returns:

Arguments for processing

Return type:

list[GeneratePronunciationsArguments]

property grapheme_symbol_table_path#

Worker’s grapheme symbol table

property input_path#

Path to temporary file to store training data

property model_path#

Current acoustic model path

property output_alignment_path#

Path to temporary file to store training data

property output_path#

Path to temporary file to store training data

property phone_symbol_table_path#

Worker’s phone symbol table

train_g2p_lexicon()[source]#

Generate a G2P lexicon based on aligned transcripts

train_iteration()[source]#

Training iteration

train_pronunciation_probabilities()[source]#

Train pronunciation probabilities based on previous alignment

property train_type#

Training type