iOS中的语音输出 [英] Voice Output in iOS
本文介绍了iOS中的语音输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以访问用于辅助功能的iOS语音合成功能?
Is it possible to access the speech synthesis feature of the iOS that is used for accessibility?
推荐答案
以下是一个示例在iOS 7上使用 AVSpeechSynthesizer
:
Here is an example using AVSpeechSynthesizer
on iOS 7:
AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc]init];
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Hey Guys"];
[synthesizer speakUtterance:utterance];
更改语音使用:
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"de-DE"];
获取所有语音的列表:
NSLog(@"voices %@", [AVSpeechSynthesisVoice speechVoices]);
这篇关于iOS中的语音输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文