什么是适用于iOS 7 AVSpeechSynthesisVoice的BCP-47语音代码? [英] What are the BCP-47 voice codes available for iOS 7 AVSpeechSynthesisVoice?
本文介绍了什么是适用于iOS 7 AVSpeechSynthesisVoice的BCP-47语音代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
今天我很高兴在iOS7中可以使用语音合成功能。
Today I'm very exited about the speech synthesis function is available in iOS7.
我想选择男声(在OSX中默认为alex)。
I want to select the male voice(default in OSX, called alex).
我不知道他的BCP-47代码是什么,BTW如何获得所有语音代码的完整列表
I don't know what's the BCP-47 code for him, and BTW how to get the full list of all voice code
推荐答案
以下是如何获取可用语音的BCP-47代码:
Here's how to get the BCP-47 codes of the available voices:
for (AVSpeechSynthesisVoice *voice in [AVSpeechSynthesisVoice speechVoices]) {
NSLog(@"%@", voice.language);
}
Alex的语言环境是英语 - 美国(en-US),as你可以在听写中看到& OS X上的语音控制面板。(单击系统语音下拉菜单中的自定义...。)
Alex's locale is "English - United States" (en-US), as you can see in the Dictation & Speech control panel on OS X. (Click "Customize..." in the "System Voice" drop down.)
这篇关于什么是适用于iOS 7 AVSpeechSynthesisVoice的BCP-47语音代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文