Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cocoa touch iOS上的文本到语音转换_Cocoa Touch_Ios_Text To Speech - Fatal编程技术网

Cocoa touch iOS上的文本到语音转换

Cocoa touch iOS上的文本到语音转换,cocoa-touch,ios,text-to-speech,Cocoa Touch,Ios,Text To Speech,我想在iOS上为语音添加文本,但注意到Cocoa Touch中似乎缺少NSSpeechSynthesizer 是否有任何第三方,商业或自由和开放源码软件,图书馆,你会推荐?苹果会拒绝包含第三方库的应用程序吗?我听说这很好,但我真的不太了解它。至于苹果是否接受带有第三方库的应用程序,这完全取决于第三方库是否使用私有框架。我确信这些信息可以在OpenEars网站上找到。看看引擎 例如,Flite有几个iOS端口 (不工作) 如果您没有在应用商店发布应用,我建议使用VoiceService A

我想在iOS上为语音添加文本,但注意到Cocoa Touch中似乎缺少NSSpeechSynthesizer

是否有任何第三方,商业或自由和开放源码软件,图书馆,你会推荐?苹果会拒绝包含第三方库的应用程序吗?

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

看看引擎

例如,Flite有几个iOS端口

  • (不工作)

如果您没有在应用商店发布应用,我建议使用VoiceService API。它是一个私有API。但它易于使用并输出高质量的声音。

从iOS 7开始,苹果提供以下API

#导入
…
avspeechoutrance*话语=[avspeechoutrance]
speechoutanthestring:@“你好,世界”];
AVSpeechSynthesizer*synth=[[AVSpeechSynthesizer alloc]init];
[synth speakoutrance:outrance];

对于那些还没有学到硬道理的人来说,Flite在质量上绝对是可怕的(最好想想旧窗口),而在任何项目中使用它所需的文件数量使得构建操作的成本高得让人望而却步。(分析示例项目会产生1个警告和33个分析器结果。不好。)它是免费的,但基本上毫无价值。我不认为它毫无价值-这取决于您是否需要高保真语音复制!我的应用程序使用Flite,并通过80年代风格的合成得到增强。
#import <AVFoundation/AVFoundation.h>
…
AVSpeechUtterance *utterance = [AVSpeechUtterance 
                            speechUtteranceWithString:@"Hello world"];
AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc] init];
[synth speakUtterance:utterance];