ios - 有没有办法在离线模式下使用 iOS 语音识别?

标签 ios swift speech-recognition apple-speech

我想知道是否有办法在离线模式下使用 iOS 语音识别。根据文档 ( https://developer.apple.com/reference/speech ),我没有看到任何相关内容。

最佳答案

恐怕没办法做到(但是,请确保在答案末尾检查更新)

Speech Framework Official Documentation 所述:

Best Practices for a Great User Experience:

Be prepared to handle the failures that can be caused by reaching speech recognition limits. Because speech recognition is a network-based service, limits are enforced so that the service can remain freely available to all apps.


从最终用户的角度来看,尝试在不连接到网络的情况下获得 Siri 的帮助应该显示类似于以下的屏幕:

enter image description here

此外,当尝试发送消息时 - 例如 - 如果设备未连接到网络,您会注意到麦克风按钮应该被禁用。

enter image description here

iOS 本身在检查网络连接之前无法使用此功能,我假设第三方开发人员在使用 Speech Framework 时也是如此。


更新:

看完Speech Recognition API Session (尤其是 03:00 - 03:25 部分),我想出了:

语音识别 API 通常 需要互联网连接,但有些新设备始终支持此功能;您可能想检查给定的语言是否可用。

改编自SFSpeech​Recognizer Documentation :

Note that a supported speech recognizer is not the same as an available speech recognizer; for example, the recognizers for some locales may require an Internet connection. You can use the supported​Locales() method to get a list of supported locales and the is​Available property to find out if the recognizer for a specific locale is available.


进一步阅读:

这些主题可能是相关的:

关于ios - 有没有办法在离线模式下使用 iOS 语音识别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42900254/

相关文章:

ios - 升级到 swift 1.2 后无法编译

javascript - 检测 ios11 设备是否处于低功耗模式,以防止在正常正确自动播放视频时出现不良用户体验

iOS( swift ): Location of touch event in UIButton programatically

iOS-图表 - 无法隐藏 Y 轴

ios - Firebase 和 Swift - 延迟 ViewController 的更改,直到读取数据

ios - 导航 Controller 在 Xcode 8 的屏幕上导致自动布局问题

swift - 通过相同的结构从不同的 API 获取数据?

python - 需要连接两个音频数据

python - Python 中的音调检测

speech-recognition - 访问 Google 的语音识别服务