Yeah, an index is a really bad idea. I use [[NSSpeechSynthesizer attributesForVoice: voice] objectForKey: NSVoiceName]
.
Storing a voice in User Defaults - Cocoa
-
15-01-2022 - |
Question
I want to store a voice in the User Defaults. Since we can't store directly a voice, what's the best way for storing it? Using the index in the array [NSSpeechSynthesizer availableVoices]
can differ after installing a new voice. And what about converting to an NSData
or storing using its identifier?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow