【问题标题】:Does in iOS 7.0 AVSpeechSynthesizer have US male voice?iOS 7.0 AVSpeechSynthesizer 中是否有美国男声?
【发布时间】:2014-01-06 06:54:06
【问题描述】:

解决方法:没有US male voice


我用AVSpeechSynthesizer framework 代替iOS7.0

AVSpeechUtterance *utt = [AVSpeechUtterance speechUtteranceWithString:@"Hello"]; 
if (isMale) //flag for male or female voice selected
{
    // need US male voice as en-US is providing only US female voice
    utt.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-GB"]; //UK male voice 
}
else
{
    utt.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"]; //US female voice
}

我需要使用US male voice 而不是male UK voice

【问题讨论】:

  • 那是什么问题,你能简单介绍一下问题吗?
  • 我需要使用美国男声而不是英国男声。
  • 我认为en-GB 应该被视为带有英语的男声,而不是被视为英国男声。我不确定,但这是我们能想到的,因为 Apple 没有为我们提供任何其他美国男性声音。
  • 关于这个问题的任何更新? iOS 8 是否添加了 en-US 男性 (Alex) 语音?我可以从设置中看到它,但它需要单独下载。下载语音包后可能就用us-Au

标签: ios objective-c iphone ios7 avspeechsynthesizer


【解决方案1】:

iOS 仍然不提供美国男声。 您可以找到所有可用语音的 BCP-47 代码

for (AVSpeechSynthesisVoice *voice in [AVSpeechSynthesisVoice speechVoices]) {
NSLog(@"%@", voice.language);
}

【讨论】:

  • 解决方案仅在问题中提供
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-11-18
  • 2016-08-09
  • 1970-01-01
  • 1970-01-01
  • 2020-02-24
  • 1970-01-01
相关资源
最近更新 更多