Hi there,
I am currently having some struggles with AVSpeechUtterance - as said in Create a seamless speech experience in your apps (WWDC2020), the Spoken Content settings should automatically apply to my utterance:
By default, AVSpeechSynthesizer will configure your utterance using the settings on your device in Accessibility Spoken Content.
This works fine for the selected voice, it automatically applies to my utterance. Changes to the speak rate do not seem to have any effect on this though.
This is the code of my sample app:
struct ContentView: View {
let synthesizer = AVSpeechSynthesizer()
let utterance = AVSpeechUtterance(string: "This is a test.")
var body: some View {
Button(action: {
synthesizer.speak(utterance)
}) {
Text("Speak")
.padding()
}
}
}
I already tried to use different voices and enable/disable different settings in Spoken Content. Any ideas? Thanks in advance!