I'm using AVSpeechSynthesizer
in a singleton. In iOS 8, when the app gets backgrounded for a while, when it resumes the AVSpeechSynthesizer
singleton will no longer speak. This issue does not happen on iOS 7.
When the app gets backgrounded, the following message shows up in my log:
AVSpeechSynthesizer Audio interruption notification: {
AVAudioSessionInterruptionTypeKey = 1;
}
I initialize the AVSpeechSynthesizer
like this in the singleton's init
method:
self.speechSynthesizer = [[AVSpeechSynthesizer alloc] init];
self.speechSynthesizer.delegate = self;
and I speak the utterance
like this:
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 anything like this on iOS 8?