TrainableIvectorExtractor#

class montreal_forced_aligner.ivector.trainer.TrainableIvectorExtractor(training_configuration=None, **kwargs)[source]#

Bases: IvectorCorpusMixin, TopLevelMfaWorker, ModelExporterMixin

Trainer for ivector extractor models

Parameters:

training_configuration (list[tuple[str, dict[str, Any]]]) – Training configurations to use, defaults to a round of dubm training followed by ivector training

See also

IvectorCorpusMixin

For parameters to parse corpora using ivector features

TopLevelMfaWorker

For top-level parameters

ModelExporterMixin

For model export parameters

add_config(train_type, params)[source]#

Add a trainer to the pipeline

Parameters:
  • train_type (str) – Type of trainer to add, one of “dubm”, “ivector”, or “plda”

  • params (dict[str, Any]) – Parameters to initialize trainer

Raises:

ConfigError – If an invalid train_type is specified

export_model(output_model_path)[source]#

Export an ivector extractor model to the specified path

Parameters:

output_model_path (str) – Path to save ivector extractor model

property meta#

Metadata about the final round of training

property model_path#

Current model path

classmethod parse_parameters(config_path=None, args=None, unknown_args=None)[source]#

Parse configuration parameters from a config file and command line arguments

Parameters:
  • config_path (Path, optional) – Path to yaml configuration file

  • args (dict[str, Any]) – Parsed arguments

  • unknown_args (list[str]) – Optional list of arguments that were not parsed

Returns:

Dictionary of specified configuration parameters

Return type:

dict[str, Any]

setup()[source]#

Setup ivector extractor training

train()[source]#

Run through the training configurations to produce a final ivector extractor model