问题:在iOS 7.x和iOS 8.x中,此代码工作正常,但在iOS 9.x中,与iOS 7中的语音速率相比,语速变慢。 8。
self.synthesizer = [[AVSpeechSynthesizer alloc] init];
self.synthesizer.delegate = self;
AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:[NSString stringWithFormat:@"Hey %@, please choose places to explore or select excursions to see our custom crafted deals",[defaults objectForKey:@"USERNAME"]]];
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"];
utterance.rate = 0.10;
[self.synthesizer speakUtterance:utterance];
答案 0 :(得分:3)
[utterance setRate: 0.5f];
将完成这项工作