PyniniCorpusGenerator#

class montreal_forced_aligner.g2p.generator.PyniniCorpusGenerator(per_utterance=False, **kwargs)[source]#

Bases: PyniniGenerator, TextCorpusMixin, TopLevelMfaWorker

Top-level worker for generating pronunciations from a corpus and a Pynini G2P model

See also

PyniniGenerator

For Pynini G2P generation parameters

TextCorpusMixin

For corpus parsing parameters

TopLevelMfaWorker

For top-level parameters

export_file_pronunciations(output_file_path)[source]#

Generate and export per-utterance G2P

Parameters:

output_file_path (Path) – Output directory to save utterance pronunciations

export_pronunciations(output_file_path)[source]#

Output pronunciations to text file

Parameters:

output_file_path (Path) – Path to save

setup()[source]#

Set up the pronunciation generator

property words_to_g2p#

Words to produce pronunciations

property working_directory#

Data directory