Last year, apple released on-device speech recognition starting with iOS 13. I've been playing with it and I haven't been able to get it to work on any of the simulators. The only way that it works is if I plug in an actual device. Is this how it's expected to be?
This is strongly influenced by this question. I have tried the answer on all of the simulators and it is stuck on downloading: "This Siri voice will take effect when downloaded"
Sample code can be found here . I've modified it with the below block:
private let speechRecognizer = SFSpeechRecognizer(locale: Locale(identifier: "en-US"))!
.
.
.
if #available(iOS 14, *) {
if speechRecognizer.supportsOnDeviceRecognition {
recognitionRequest.requiresOnDeviceRecognition = true
print("recognitionRequest.requiresOnDeviceRecognition:", recognitionRequest.requiresOnDeviceRecognition)
}
}
Yes indeed. You must use physical device for speech recognition support. You must use microphone input which is not supported in the simulator. It is quite common for some capabilities to not be supported in the simulator. Specifically voice relate. link
In the WWDC video they also mentioned all supported devices (you must have A9 core).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.