我有一个测验,我希望我的应用程序阅读问题和对用户的回复。 有没有可用的iOS库?
答案 0 :(得分:1)
查看AVSpeechSynthesizer
班级(https://developer.apple.com/Library/ios/documentation/AVFoundation/Reference/AVSpeechSynthesizer_Ref/Reference/Reference.html)。
AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:@"Your text"];
AVSpeechSynthesizer *speechSynthesizer = [[AVSpeechSynthesizer alloc] init];
[speechSynthesizer speakUtterance:utterance];