Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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];
like image 404
Umesh Y Avatar asked Sep 26 '22 15:09

Umesh Y


2 Answers

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.

like image 182
Ali Beadle Avatar answered Sep 30 '22 07:09

Ali Beadle


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{

    }
like image 30
Supapon Pick Pucknavin Avatar answered Sep 30 '22 06:09

Supapon Pick Pucknavin