IOS Swift : UIAccessibilitySpeechAttributeIPANotation
问题 I am trying to make my app to speak in the IPANotation using AVSpeechSynthesizer , but it not working below is my code snippet, let synthesizer = AVSpeechSynthesizer() let attributedStr = NSMutableAttributedString(string: "Hello iPhone") attributedStr.addAttribute(NSAttributedString.Key(UIAccessibilitySpeechAttributeIPANotation), value: "ˈa͡ɪ.ˈfo͡ʊn", range: NSRange(location: 6, length: 6)) let utterance = AVSpeechUtterance(attributedString: attributedString) synthesizer.speak(utterence)