trftools.dictionaries.read_dict
- trftools.dictionaries.read_dict(dictionary='english', strip_stress=False, upper=False)
Read a forced aligner dictionary file
- Parameters:
Dictionary file name, or name of a built-in dictionary:
english: Montreal Forced Aligner English dictionary
strip_stress (bool) – Strip stress information from vowels (e.g., ‘AH0’ -> ‘AH’).
upper (bool) – Force keys to uppercase.
- Returns:
Dictionary mapping words to sets of pronunciations
{str: {str, ...}}.- Return type:
dictionary