jjzjj

playQueue

全部标签

ios - AVSpeechSynthesizer 错误 : An AVSpeechUtterance shall not be enqueued twice

我有点卡住了。这是我的代码:letspeaker=AVSpeechSynthesizer()varplayQueue=[AVSpeechUtterance]()//currentqueuevarbackedQueue=[AVSpeechUtterance]()//queuebackup...funcmoveBackward(_currentUtterance:AVSpeechUtterance){speaker.stopSpeaking(at:.immediate)letcurrentIndex=getCurrentIndexOfText(currentUtterance)//outo