Text to Speech in OS X Application

有些话、适合烂在心里 提交于 2019-12-11 18:11:58

问题


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!


回答1:


What you call “text-to-speech” is also commonly abbreviated as TTS and alternatively called “speech synthesis”.

The Cocoa class NSSpeechSynthesizer is the API to use. The canonical sample code is CocoaSpeechSynthesisExample.

There also is a guide to “Speech Programming Topics” and a “Speech Synthesis Programming Guide” available.

Finally, there are lower level APIs available if you need access to stuff that is abstracted away for you by NSSpeechSynthesizer.




回答2:


Look at this please NSSpeechRecognizer example

its a text to speech built in library for OS X .. NSSpeechRecognizer



来源:https://stackoverflow.com/questions/17845791/text-to-speech-in-os-x-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!