objective-c - iOS7 和 iOS 9 中的 AVSpeechSynthesizer 发音率不同

标签 objective-c text-to-speech ios9 xcode7 avspeechsynthesizer

问题:在 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/

相关文章:

.net - 我怎样才能让我们最先进的文本转语音变得简单?

c# - 如何将文本字符串转换为语音

android - 从广播接收器或服务启动 Android TTS

ios - 什么时候LAContext :evaluatePolicy result in LAError. AppCancel?

python - 如何包装 Objective-C,以便从 Python 调用?

iphone - 旋转时 UIBezierPath containsPoint 的问题

Objective-C 从方法返回枚举数组

ios - 使用 UIStackView 使单个 View 居中

swift - 如何通过代码在方向更改时向 UIStackView.Axis 添加更改?

objective-c - 在重叠动画 block 中设置 UIView 的 frame 属性导致跳转