Search code examples
swift2avfoundationios9xcode7.1

Swift ios9 Building MacinTalk voice for asset: (null)


I am using xcode 7 , swift 2.0

I am getting voice text to Speech working in Simulator but not in real iphone6 plus device, iOS 9. I have properly imported AVFOUNDATION and its Framework.

I tried...

@IBAction func SpeakTheList(sender: AnyObject) {
    let mySpeechUtterance = AVSpeechUtterance(string: speakString)

    //let voice = AVSpeechSynthesisVoice(language: "en-US")
   // mySpeechUtterance.voice = voice

    let voices = AVSpeechSynthesisVoice.speechVoices()

    for voice in voices {

        if "en-US" == voice.language {
            mySpeechUtterance.voice = voice
            print(voice.language)
            break;
        }
    }
    mySpeechSynthesizer.speakUtterance(mySpeechUtterance)
}

I get the following error : Building MacinTalk voice for asset: (null) Is there anything I ned to do settings in my iphone6plus iOS 9 , or I have to download something.

I have found a suggestion here Why I'm getting "Building MacinTalk voice for asset: (null)" in iOS device test

saying that.. " since iOS9, possibly a log event turned on during development that they forgot to turn off"


Solution

  • Finally Found that there was a bug in iOS9, soon after XCODE new release 7.2 update, and iOS 9.2 Update release, I tested same above code, text to speech started working.