Try declaring
struct SUINightMode: View {
@ObservedObject var dtd = DateTimeData()
@Environment(\.presentationMode) var presentationMode
@State private var date = Date()
let synthesizer = AVSpeechSynthesizer() <---------
var body: some View {
ZStack {
...
...
...
Image(systemName: "speaker.wave.3.fill")
.resizable()
.foregroundColor(.green)
.frame(width: 50, height: 30)
.padding(10)
.position(x: 120, y: 40)
.onTapGesture {
let speakTime = AVSpeechUtterance(string: "The time is, \(dtd.timeString(date: dtd.date))...., today is \(dtd.dayString(date: dtd.date)) \(dtd.dateString(date: dtd.date))")
synthesizer.speak(speakTime)
...
...
}
}
}
}
It helped me.
Post
Replies
Boosts
Views
Activity
Yes, I have the same problem. Everything worked with IOS 15, now the same applications do not reproduce speech.