trftools.dictionaries.write_dict

trftools.dictionaries.write_dict(dictionary, file_name, separator='\t')

Write a pronunciation dictionary to a text file

Parameters:
  • dictionary (Dict[str, Collection[str]]) – Dictionary mapping words (all caps) to lists of pronunciations.

  • file_name (Path | str) – Destination file.

  • separator (str) – String to separate words from their pronunciation. The Montral Forced Aligner expects tab (the default).