AcousticModel#
- class montreal_forced_aligner.models.AcousticModel(source, root_directory=None)[source]#
Bases:
Archive
Class for storing acoustic models in MFA, exported as zip files containing the necessary Kaldi files to be reused
- add_meta_file(trainer)[source]#
Add metadata file from a model trainer
- Parameters:
trainer (
ModelExporterMixin
) – Trainer to supply metadata information about the acoustic model
- property alignment_model_path#
Alignment model path
- export_model(destination)[source]#
Extract the model files to a new directory
- Parameters:
destination (str) – Destination directory to extract files to
- property lda_mat_path#
Current acoustic model path
- property lda_options#
Parameters to use in computing MFCC features.
- property meta#
Metadata information for the acoustic model
- property mfcc_options#
Parameters to use in computing MFCC features.
- property model_path#
Current acoustic model path
- property parameters#
Parameters to pass to top-level workers
- property phone_symbol_path#
Path to phone symbol table
- property pitch_options#
Parameters to use in computing MFCC features.
- property rules_path#
Path to phone symbol table
- property tree_path#
Current acoustic model path
- validate(dictionary)[source]#
Validate this acoustic model against a pronunciation dictionary to ensure their phone sets are compatible
- Parameters:
dictionary (
DictionaryMixin
) – DictionaryMixin to compare phone sets with- Raises:
PronunciationAcousticMismatchError – If there are phones missing from the acoustic model