0

I am creating a native OS X application, and I was surprised at how difficult it is to find documentation on text-to-speech with native APIs. What would be the easiest way of having my application speak (using Alex's voice for example)?

Thanks!

4

2 回答 2

2

您所说的“文本到语音”通常也缩写为 TTS,或者称为“语音合成”。

Cocoa 类NSSpeechSynthesizer是要使用的 API。规范的示例代码是CocoaSpeechSynthesisExample

还有“<a href="https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Speech/Speech.html" rel="nofollow">语音编程主题指南”和提供“<a href="https://developer.apple.com/library/mac/#documentation/userexperience/Conceptual/SpeechSynthesisProgrammingGuide/Introduction/Introduction.html" rel="nofollow">语音合成编程指南”。

最后,如果您需要访问由 NSSpeechSynthesizer 为您抽象出来的内容,则可以使用较低级别的 API 。

于 2013-07-25T06:32:56.950 回答
0

请看这个NSSpeechRecognizer 例子

它是为 OS X 内置的库中的文本转语音 ..NSSpeechRecognizer

于 2013-07-25T03:25:53.097 回答