Speech Synthesis on iOS weird errors on loading, and no concurrency
问题 I'm using the speech synth in AVFoundation, creating an instance of a voice like this: import AVFoundation class CanSpeak { let voices = AVSpeechSynthesisVoice.speechVoices() let voiceSynth = AVSpeechSynthesizer() var voiceToUse: AVSpeechSynthesisVoice? init(){ for voice in voices { if voice.name == "Arthur" { voiceToUse = voice } } } func sayThis(_ phrase: String){ let utterance = AVSpeechUtterance(string: phrase) utterance.voice = voiceToUse utterance.rate = 0.5 voiceSynth.speak(utterance)