I am using AVSpeechSynthesizer in singleton mode. In iOS 8 , when the application receives some time, when it resumes the AVSpeechSynthesizer singleton, it will no longer speak. This issue does not occur with iOS 7 .
When the application receives background messages, the following message appears in my log:
AVSpeechSynthesizer Audio interruption notification: { AVAudioSessionInterruptionTypeKey = 1; }
I initialize AVSpeechSynthesizer as follows in the singleton init method:
self.speechSynthesizer = [[AVSpeechSynthesizer alloc] init]; self.speechSynthesizer.delegate = self;
and I say utterance as follows:
AVSpeechUtterance *utt = [[AVSpeechUtterance alloc] initWithString:dialogue]; utt.voice = [AVSpeechSynthesisVoice voiceWithLanguage:voice]; utt.pitchMultiplier = pitch; utt.rate = rate; utt.preUtteranceDelay = preDelay; utt.postUtteranceDelay = postDelay; utt.volume = volumeSetting; [self.speechSynthesizer speakUtterance:utt];
Has anyone seen something similar on iOS 8 ?
ios ios8 avspeechsynthesizer
bmueller
source share