Ham provides functionality on top of the CMU Pronouncing Dictionary (http://www.speech.cs.cmu.edu/cgi-bin/cmudict), to manipulate words and pronunciations.
Documentation is available at http://ham.readthedocs.org
Project home page: http://github.com/ftobia/ham