【问题标题】:AVSpeechSynthesizer utterance rate varying in iOS7 & iOS 9AVSpeechSynthesizer 话语率在 iOS7 和 iOS 9 中不同
【发布时间】:2015-12-27 08:32:46
【问题描述】:

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

【问题讨论】:

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


【解决方案1】:

[utterance setRate: 0.5f]; 将完成这项工作

【讨论】:

  • [话语集率:0.5f];这肯定会提高话语率.. 但现在在 iOS 7 和 iOS 8 上它会变得太快
  • if ([[[UIDevice currentDevice] systemVersion] floatValue] > 8.5) { [utterance setRate:0.5f]; } else { [utterance setRate:0.1f]; }??
  • 是的,这就是我们正在做的事情,但为什么会这样呢?为什么话语率会发生变化
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多