Ios 如何使用AVSpeechSynthesizer阅读国际音标字母

Ios 如何使用AVSpeechSynthesizer阅读国际音标字母,ios,avspeechsynthesizer,phonetics,Ios,Avspeechsynthesizer,Phonetics,我正在开发一个iOS应用程序,我有一些拼音单词,我想让我的iPhone说出这些单词 例如,“tʃat”的意思是“聊天” 但是AVSpeechSynthesis不能正确地说。ʃ不发音 我错过了什么吗?我需要第三部分吗?或者这在iOS上可能吗 AVSpeechSynthesizer不支持语音,只支持常规文本,如下所示: let string = "Hello, World!" let utterance = AVSpeechUtterance(string: string) utterance.vo

我正在开发一个iOS应用程序,我有一些拼音单词,我想让我的iPhone说出这些单词

例如,“tʃat”的意思是“聊天”

但是AVSpeechSynthesis不能正确地说。ʃ不发音


我错过了什么吗?我需要第三部分吗?或者这在iOS上可能吗

AVSpeechSynthesizer不支持语音,只支持常规文本,如下所示:

let string = "Hello, World!"
let utterance = AVSpeechUtterance(string: string)
utterance.voice = AVSpeechSynthesisVoice(language: "en-US")

let synthesizer = AVSpeechSynthesizer()
synthesizer.speakUtterance(utterance)
(代码从中删除)

avspeechoutance的init方法的参数为:

字符串-包含要说出的文本的字符串