我正在玩 AVSpeechSynthesizer 并且总是遇到这些错误:
ERROR: >aqsrv> 65: Exception caught in (null) - error -66634
ERROR: AVAudioSessionUtilities.h:88: GetProperty_DefaultToZero: AudioSessionGetProperty ('disa') failed with error: '?ytp'
我的代码是:
AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc] init];
[synthesizer setDelegate:self];
speechSpeed = AVSpeechUtteranceMinimumSpeechRate;
AVSpeechUtterance *synUtt = [[AVSpeechUtterance alloc] initWithString:[[self text] text]];
[synUtt setRate:speechSpeed];
[synUtt setVoice:[AVSpeechSynthesisVoice voiceWithLanguage:languageCode]];
[synthesizer speakUtterance:synUtt];
有谁知道如何解决这些错误?