Why I'm getting “Building MacinTalk voice for asset: (null)” in iOS device test

情到浓时终转凉″ 提交于 2019-12-22 06:58:45

问题


I'm executing below code for text-to-speech project on device, but getting error "Building MacinTalk voice for asset: (null)" Please any help on how I can fix or any tips what's going wrong.

 AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc]init];
    AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Tips For Silicon Valley From A Startup Accelerator In Gaza"];
    [utterance setRate:0.015f];
    utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-GB"];
    [synthesizer speakUtterance:utterance];

回答1:


If it the same as I am seeing then it is not really an error - it is an output to the log and a minor annoyance but can be ignored. The reference 'null' is worrying but the speechSynthesizer is still working and talking correctly and users will not see this message on real devices. I have only seen this since iOS9, possibly a log event turned on during development that they forgot to turn off.




回答2:


I have log error like that (Building MacinTalk voice for asset: (null)) I don't know why, but if your project don't show sound in device I think you forgot allow activating an audio session.

import AVFoundation

///

do{
        try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)

        do{
            try AVAudioSession.sharedInstance().setActive(true)
        }catch{

        }
    }catch{

    }


来源:https://stackoverflow.com/questions/32774480/why-im-getting-building-macintalk-voice-for-asset-null-in-ios-device-test

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!