【问题标题】:AVSpeechSynthesizer does not work on iPadAVSpeechSynthesizer 在 iPad 上不起作用
【发布时间】:2014-10-24 01:17:26
【问题描述】:

这个简单的代码在我的 iPhone 上运行良好,但在我的 Pad 上却不行。无论如何,语音合成器在 iPad 上保持沉默。可能是什么问题呢?从选定的文本朗读在 iPad 上确实有效,没有错误。没有警告,没有消息,什么都没有。

我在 iOS7 上使用 Xcode 6、iPhone 5s 和 iPad 4。

#import <AVFoundation/AVFoundation.h>

AVSpeechSynthesizer *synthesizer; 

@interface ViewController ()

@end

@implementation ViewController
- (IBAction)Speak:(id)sender 
{  NSString* Phrase = @"Hello world!"; 
   synthesizer = [[AVSpeechSynthesizer alloc]init]; // init speech synth }
   AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:Phrase];   
   [synthesizer speakUtterance:utterance];
} 

【问题讨论】:

  • 嗨,迈克尔,我也有同样的问题……你有什么提示吗?
  • 我很尴尬地说,在我的情况下,它是被配置为静音开关的侧面开关。当您的孩子知道您 iPad 的密码时,就会发生这种情况。

标签: ipad avspeechsynthesizer


【解决方案1】:

这是一个 8.0 的错误。 @(#)8.1 解决了这个问题。

【讨论】:

    最近更新 更多