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?

Était-ce utile?

La solution

Yeah, an index is a really bad idea. I use [[NSSpeechSynthesizer attributesForVoice: voice] objectForKey: NSVoiceName].

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top