Text.Pronounce is a Haskell library for interfacing and CMU Pronouncing Dictionary. It is based off of Allison Parrish's python library called pronouncing , and it exports much of the same functionality. The underlying data structure that I used for representing the dictionary was a Map from entries to lists of their possible phones as represented in the CMU dict. Many functions rely on access to the CMU dict, so I decided to encompass this underlying state of the dictionary by using the Reader Monad.

When working with this library, the default setting is to load the dictionary from an included binary file, but the user has the option to parse the dictionary from a unicode text file, or encode the text file into binary themselves. For this last purpose, I included the script I originally used to encode the dictionary into a binary in the examples folder.