Correcting Pronunciation Errors in 'Say' Command in Terminal I'm having difficulty correcting the pronunciation in the 'say' command, using 10.9.

I tried to add new pronunciations through:

System Preferences > Dictation and Speech > Open Accessibility Preferences > Open VoiceOver Utility > Speech > Pronunciation > +

After I added a new entry I tried it in both Terminal and TextEdit and neither pronounced it correctly:

$ say -v "Samantha" -f filename.txt -o audiofile.aiff


Although it did not work in TextEdit (Edit > Speech > Start Speaking), I want to be able to accomplish this in Terminal.

Does anyone have any idea of how I can go about doing this?
According to this 2007 thread at discussions.apple.com the VoiceOver utility only fixes pronunciations in VoiceOver itself, not in text-to-speech.

So if you want to get say to correctly pronounce the words you should run a find and replace on the text file for each mis-pronounced word. There is probably a good way to do this in one step with a script, but if you just want to do it once you could:


Open the file in Text Edit (or any text editor you prefer, I like Text Wrangler)
Find (e.g.) "women" and replace all with "wimmen" (Located at Edit &gt; Find &gt; Find and Replace... in Text Edit) 
Move to the next word you want to correct finding and replacing all until you've corrected all the mispronunciations. 
Run say on the now incorrectly spelled text file.