簡體   English   中英

iOS上的文字轉語音

[英]Text to Speech on iOS

我想在iOS上添加文本到語音,但注意到Cocoa-Touch似乎缺少NSSpeechSynthesizer。

你會推薦哪些第三方,商業或FOSS圖書館? Apple會拒絕包含第三方庫的應用程序嗎?

如何以編程方式使用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];

我聽說OpenEars很好,但我真的不太了解它。 至於Apple接受第三方庫的應用程序,這完全取決於第三方庫是否使用私有框架。 我確信OpenEars網站上提供的信息。

如果您未在App Store上發布應用程序,我建議使用VoiceService API。 它是一個私有API。 但它易於使用並輸出高質量的聲音。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM