工程建好后首先把AVFoundation.framework 加入到工程
AVSpeechSynthesizer *av = [[AVSpeechSynthesizer alloc]init];
AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc]initWithString:@"Hello qingjoin"]; //需要转换的文本
[av speakUtterance:utterance];
工程建好后首先把AVFoundation.framework 加入到工程
AVSpeechSynthesizer *av = [[AVSpeechSynthesizer alloc]init];
AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc]initWithString:@"Hello qingjoin"]; //需要转换的文本
[av speakUtterance:utterance];