每次我使用 AVSpeechSynthesizer 朗读文本时,仪器都会报告 AXSpeechImplementation 库中的内存泄漏。这是我用来拨打电话的代码:
AVSpeechUtterance *speak = [AVSpeechUtterance speechUtteranceWithString:text];
speak.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"];
speak.rate = AVSpeechUtteranceMaximumSpeechRate * .2;
[m_speechSynth speakUtterance:speak];