daniel needs to attract extra consideration to this query:
I would like contour attribute to vary the inflection or intonation of the textual content spoken.
I bought this SSML from w3.org. AVSpeechUtterance(ssmlRepresentation:) will not be complying with the contour. It does not change the hz. It at all times performs on the identical hz degree. I am utilizing: Xcode 15.3, iPhone 8 machine with iOS 16.7.5, Swift.
This is the String worth for ssmlRepresentation. SSML with contour tag:
<?xml model=”1.0″?>
<communicate model=”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%,90Hz) (40%,90Hz) (0%,90Hz)”>
good morning
</prosody>
</communicate>
My code:
override func viewDidLoad() {
tremendous.viewDidLoad()
guard let localUtterance = AVSpeechUtterance(ssmlRepresentation: self.speechSML) else {
print(“SML didn’t work.”)
return
}
self.utterance = localUtterance
self.utterance.voice = self.voiceNoelle
}
self.synthesizer.communicate(self.utterance)