是否可以访问用于辅助功能的iOS语音合成功能?
答案 0 :(得分:6)
以下是在iOS 7上使用AVSpeechSynthesizer
的示例:
AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc]init];
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Hey Guys"];
[synthesizer speakUtterance:utterance];
更改语音使用:
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"de-DE"];
获取所有声音的列表:
NSLog(@"voices %@", [AVSpeechSynthesisVoice speechVoices]);
答案 1 :(得分:1)
答案 2 :(得分:0)
现在,从ios7开始,您可以使用内置的AVSpeechSynthesizer