AVSpeechSynthesizer扬声器上

时间:2013-12-05 17:39:53

标签: speaker avspeechsynthesizer

我可以听到连接时通过耳机读取的文字。但是,如果我断开耳机,它根本不会播放。如何为此演讲开启演讲者? 这是我的代码:

[syn stopSpeakingAtBoundary:AVSpeechBoundaryImmediate];
syn = [[AVSpeechSynthesizer alloc] init];
syn.delegate = self;
utt = [AVSpeechUtterance  speechUtteranceWithString:rtext];
float speechSpeed = 0.3;
NSLog(@"Read***** text%@",rtext);
[utt setRate:speechSpeed];
utt.volume = 1;
[syn speakUtterance:utt];

0 个答案:

没有答案