在iOS上的文本到语音

我想在iOS上添加文本到语音,但是注意到NSSpeechSynthesizer似乎从Cocoa-Touch中丢失了。

有什么第三方,商业或FOSS,你会推荐的图书馆? 苹果是否会拒绝包含第三方库的应用程序?

我听说OpenEars很好,但我不太了解它。 至于苹果接受第三方库的应用程序,这一切都取决于第三方库是否使用私有框架。 我确信这些信息可以在OpenEars网站上find。

如何以编程方式使用iOS语音合成器? (文字转语音)

从iOS 7开始,Apple提供了以下API …

https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVSpeechSynthesizer_Ref/Reference/Reference.html

#import <AVFoundation/AVFoundation.h> … AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Hello world"]; AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc] init]; [synth speakUtterance:utterance]; 

如果您不在App Store上发布您的应用,我推荐使用VoiceService API。 这是一个私人API。 但它很容易使用和输出高品质的声音。

Interesting Posts