我使用此链接制作自定义键盘 https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Keyboard.html
现在我需要添加文本转语音功能。换句话说,当用户按下按键时,它会说出该词。您能告诉我这是怎么可能的吗?在 IOS 8 中可能吗?
最佳答案
查看 ios7 及更高版本中可用的以下类
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"whatever text"];
AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc] init];
[synth speakUtterance:utterance];
有关更多信息,请查看苹果的图书馆文档
关于ios - 如何在 IOS 8 中使用自定义键盘进行文字转语音?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26233954/