Tôi đang chơi xung quanh với AVSpeechSynthesizer và luôn nhận được các lỗi này:AVSpeechSynthesizer lỗi AudioSession
ERROR: >aqsrv> 65: Exception caught in (null) - error -66634
ERROR: AVAudioSessionUtilities.h:88: GetProperty_DefaultToZero: AudioSessionGetProperty ('disa') failed with error: '?ytp'
Mã của tôi là:
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];
Có ai biết làm thế nào để sửa chữa các lỗi này?
Tôi chỉ thấy điều này trong Trình mô phỏng iOS - không có trên thiết bị. Bạn có thấy giống nhau không? –
Tôi cũng tò mò nếu đây chỉ là một ngoại lệ giả lập. Tôi đã có ngoại lệ khác bằng cách sử dụng AVFoundation trong trình mô phỏng. – bollhav
Ồ vâng, đúng, cùng ở đây! – h345k34cr