【问题标题】:Using the Alex voice with AVSpeechSynthesisVoice: voiceWithLanguage使用 AVSpeechSynthesisVoice 的 Alex 语音:voiceWithLanguage
【发布时间】:2014-11-12 14:08:50
【问题描述】:

有没有人深入了解 AVSpeechSynthesisVoice 类并弄清楚如何使用 Alex 语音? - 它不会出现在调用 AVSpeechSynthesisVoice:speechVoices 返回的声音列表中。我向 DTS 提交了一张票,他们的回复是:

感谢您联系 Apple 开发者技术支持 (DTS)。我们的工程师已经审核了您的请求,并得出结论认为,鉴于当前发布的系统配置,没有支持的方式来实现所需的功能。

如果您希望 Apple 考虑在未来添加对此类功能的支持,请通过 Bug Reporter 工具提交增强请求,地址为 http://bugreport.apple.com。

Apple 的大多数内置应用程序都可以像 Notes 和 Reminders 一样使用它 - 但 Safari 不会使用它。我真的不在乎 Apple 是否支持该解决方案 - 这仅适用于内部应用程序。

谢谢!

【问题讨论】:

  • 这个问题似乎跑题了,因为 Apple 开发者技术支持已经提供了答案。
  • 不,这个问题不是题外话,因为 DTS 没有回答,因为 OP 可以使用非官方解决方案。

标签: ios speech


【解决方案1】:

如果语音在设备上可用,它将显示在对 AVSpeechSynthesisVoice:speechVoices 的调用中。

要将语音添加到您的手机(我使用的是 iOS 10.3.2),请访问: Settings/General/Accessibility/Speech/Voices/English/Alex 点击云图标下载。

下载后,您可以像这样列出声音:

// Swift 3 
let voices = AVSpeechSynthesisVoice.speechVoices()
for szVoice in voices {
  print(szVoice)
}

它在列表中显示为姓氏。

[AVAlexSpeechSynthesisVoice 0x1700150d0] Language: en-US, Name: Alex, Quality: Enhanced [com.apple.speech.voice.Alex]

【讨论】:

  • 感谢您的回答 - 在 Alex 被包含在可用的声音中之前发布了这个问题,最终在随后的 iOS 版本中发生。
  • 您是否注意到,与所有其他声音不同,Alex 声音的类别是AVAlexSpeechSynthesisVoice?你怎么看?
猜你喜欢
  • 1970-01-01
  • 2019-03-15
  • 1970-01-01
  • 2016-06-24
  • 1970-01-01
  • 1970-01-01
  • 2016-06-16
  • 2018-02-23
  • 1970-01-01
相关资源
最近更新 更多