G2PTopLevelMixin#

class montreal_forced_aligner.g2p.mixins.G2PTopLevelMixin(**kwargs)[source]#

Bases: MfaWorker, DictionaryMixin, G2PMixin

Abstract mixin class for top-level G2P functionality

See also

MfaWorker

For base MFA parameters

DictionaryMixin

For dictionary parsing parameters

G2PMixin

For base G2P parameters

export_pronunciations(output_file_path)[source]#

Output pronunciations to text file

Parameters:

output_file_path (Path) – Path to save

generate_pronunciations()[source]#

Generate pronunciations

Returns:

Mappings of keys to their generated pronunciations

Return type:

dict[str, list[str]]