I got this SSML from w3. org. AVSpeechUtterance(ssmlRepresentation:) is not complying with the contour. It doesn't change hz.
<?xml version="1.0"?>
<speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/10/synthesis
http://www.w3.org/TR/speech-synthesis11/synthesis.xsd"
xml:lang="en-US">
<prosody contour="(0%,+20Hz) (10%,+30%) (40%,+10Hz)">
good morning
</prosody>
</speak>
override func viewDidLoad() {
super.viewDidLoad()
guard let localUtterance = AVSpeechUtterance(ssmlRepresentation: self.speechSML) else {
print("SML did not work.")
return
}
self.utterance = localUtterance
self.utterance.voice = self.voiceNoelle
}
self.synthesizer.speak(self.utterance)