AdaptingAligner#

class montreal_forced_aligner.alignment.AdaptingAligner(mapping_tau=20, **kwargs)[source]#

Bases: PretrainedAligner, AdapterMixin

Adapt an acoustic model to a new dataset

Parameters:

mapping_tau (int) – Tau to use in mapping stats between new domain data and pretrained model

See also

PretrainedAligner

For dictionary, corpus, and alignment parameters

AdapterMixin

For adapting parameters

Variables:
  • initialized (bool) – Flag for whether initialization is complete

  • adaptation_done (bool) – Flag for whether adaptation is complete

acc_stats(alignment=False)[source]#

Accumulate stats for the mapped model

Parameters:

alignment (bool) – Flag for whether to accumulate stats for the mapped alignment model

adapt()[source]#

Run the adaptation

property align_directory#

Align directory

property alignment_model_path#

Current acoustic model path

export_model(output_model_path)[source]#

Output an acoustic model to the specified path

Parameters:

output_model_path (str) – Path to save adapted acoustic model

map_acc_stats_arguments(alignment=False)[source]#

Generate Job arguments for AccStatsFunction

Returns:

Arguments for processing

Return type:

list[AccStatsArguments]

property meta#

Acoustic model metadata

property model_path#

Current acoustic model path

property next_model_path#

Mapped acoustic model path

train_map()[source]#

Trains an adapted acoustic model through mapping model states and update those with enough data.

See also

AccStatsFunction

Multiprocessing helper function for each job

AdaptingAligner.map_acc_stats_arguments

Job method for generating arguments for the helper function

gmmbin/gmm-sum-accs.cc

Relevant Kaldi binary

gmmbin/gmm-ismooth-stats.cc

Relevant Kaldi binary

gmmbin/gmm-est.cc

Relevant Kaldi binary

train_map.sh

Reference Kaldi script

property working_log_directory#

Current log directory