Search code examples
xcodetext-to-speechvoiceover

NSSpeechSynthesizer compact voices


I'm writing to ask you a question about NSSpeechSynthesizer. Really it works perfect for me, the only things I saw is strange (to me) is that the available voices are all the premium voices.

    NSArray* voices;
    voices = [NSpeechSynthesizer availableVoices];

When I print all voices in the array I can see, for instance, Silvia and Paolo, but not Silvia Compact and Paolo Compact.

For the italian language, unfortunately, the premium version have many bugs in their way of speaking that the compact voices haven't. So I'd like to be able to select the Compact version... does anyone of you know how can I make them available?

Thank you very much...


Solution

  • You could use availableVoices, and whenever a voice ends in ".premium" try replacing ".premium" with ".compact". That will only work with voices that the user has installed, but that should be no surprise for the user.