问题:在iOS 7.x和iOS 8.x中,此代码可以正常工作,但与iOS 7和8中的语速相比,iOS 9.x中的语速越来越慢。
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];
最佳答案
[utterance setRate: 0.5f];
将完成这项工作
关于objective-c - 在iOS7和iOS 9中AVSpeechSynthesizer发声率各不相同,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32851129/