Frontend uses pre-packed resources and models to add pronunciations to the words. Pronunciation is either looked up in a dictionary or generated using a model.

Check learn_to_pronounce (github, documentation) package, you can add pronunciations for custom words or adjust existing ones. It works with pronunciation resource repositories: