//这里写自己的viewDidLoad
//给语音播报赋值
NSString *str =self.nextmodel.content;
//声明个数组 用逗号分隔
NSArray *strarray = [str componentsSeparatedByString:@","];
//调用
[self speechWithArray:strarray];
#pragma mark===================把数组中的内容分段阅读,中间加入提示音========
-(void) speechWithArray:(NSArray *)array{
扫描二维码关注公众号,回复:
6004361 查看本文章
self.speech_content_array = array;
if(self.speech_content_array == nil || [self.speech_content_array count] <= 0 ){
return ;
}
[self speechWithString:self.speech_content_array[0] ];
}
-(void) speechWithString:(NSString *) content{
[_iFlySpeechSynthesizer startSpeaking:content];
}