I have AVSpeechSynthesizer built in to 6 apps for iPad/iOS that were working fine until recently. Sometime between November 2023 and Feb 2024, they just quit speaking on all the apps for no apparent reason. There have been both XCode and iOS updates in the interim, but I cannot be sure which caused it. It doesn't work either in XCode on simulation, nor on devices.
What did Apple change?
XCode 15.2 iOS 17+ SwiftUI
let synth = AVSpeechSynthesizer() var thisText = "" func sayit(thisText: String) { let utterance = AVSpeechUtterance(string: thisText)
utterance.voice = AVSpeechSynthesisVoice(language:"en-US")
utterance.rate = 0.4
utterance.preUtteranceDelay = 0.1
synth.speak(utterance)}