title: How do I add new speech dictionaries to NSSpeechSynthesizer?
body: <p>I've been trying to set up custom pronunciations for a NSSpeechSynthesizer derived speech engine used by my app. However, I've been running into problems.</p>
  
  <p>I'm creating a new dictionary to add to my speech engine using the keys specified in the NSSpeechSynthesizer class reference, but the documentation is very confusing and missing some important information. The relevant section is entitled "Speech Dictionary Property Keys" at the following link: <a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSSpeechSynthesizer_Class/Reference/Reference.html" rel="nofollow">https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSSpeechSynthesizer_Class/Reference/Reference.html</a></p>
  
  <p>I'm a bit confused by this, because it seems like the NSSpeechDictionaryPronunciations key contains the same information as NSSpeechDictionaryEntryPhonemes and NSSpeechDictionaryEntrySpelling. There is also no information on whether all the keys are required, or if they're optional, what constitutes valid data for each key, or how to obtain existing values from the already initialized speech engine. I also can't find any details on when it is acceptable to add a new speech dictionary.</p>
  
  <p>What I have assumed, based on what I gather from this documentation, is that a speech dictionary is that each key is optional, and appends to whatever data is already being used by the engine, with newly added dictionaries taking preference over existing data where there are conflicts. I've defined a diuctionary containing just the NSSpeechDictionaryPronunciations key, with the value being an array of NSDictionary objects containing the keys NSSpeechDictionaryEntrySpelling and NSSpeechDictionaryEntryPhonemes, as detailed in the documentation. The speech engine is already initialized when I call -addSpeechDictionary:.</p>
  
  <p>However, this throws an error. The actual error code that gets thrown depends on the voice I've chosen, but it always throws an error, and the defined pronunciations have no effect.</p>
  
  <p>I can only assume that I'm doing something wrong, but since I can't find any information anywhere on how this functionality is to be used (beyond the very vague documentation), I'm a bit stuck. Does anyone have any experience with this feature and coudl point me in the right direction? Or even point me in the direction of a book or something that covers this in better detail? Google has been no help...</p>