啥都不说:
直接上代码
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"你好我使用台语发音跟你说话。"];
//台语发音
AVSpeechSynthesisVoice *voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"zh-TW"];
utterance.voice = voice;
utterance.volume = 1.0;
utterance.rate= 0.2; //设置语速
utterance.pitchMultiplier= 1.1;
NSLog(@"%@",[AVSpeechSynthesisVoice speechVoices]);
AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc]init];
[synth speakUtterance:utterance];