OS X应用程序中的文本到语音 [英] Text to Speech in OS X Application

查看:93
本文介绍了OS X应用程序中的文本到语音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建本机OS X应用程序,对于使用本机API查找文本到语音文档非常困难,我感到惊讶.让我的应用程序讲话的最简单方法是什么(例如,使用Alex的声音)?

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)?

谢谢!

推荐答案

您所说的文本转语音"通常也缩写为TTS,或者简称为语音合成".

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

可可类 NSSpeechSynthesizer 是要使用的API.规范示例代码为 CocoaSpeechSynthesisExample .

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.

最后,有下层API 如果需要访问NSSpeechSynthesizer为您抽象的内容,则可用.

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

这篇关于OS X应用程序中的文本到语音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆