6

I've just updated to macOS 10.15.4 and every time I check if on-device speech recognition is available I get back false. This was working on 10.15.3.

speechRecognizer?.supportsOnDeviceRecognition = true
print("supportsOnDeviceRecognition: \(String(describing: speechRecognizer?.supportsOnDeviceRecognition))")

Anybody else seeing this? Are there any tricks to get this working again?

user1542125
  • 593
  • 6
  • 16

1 Answers1

0

Be aware supportsOnDeviceRecognition is locale dependent. If you init your SFSpeechRecognizer with the locale you are targeting, it will just start returning true assuming the locale Siri dictionary is downloaded on the device:

var unLocalizedSpeechRecognizer = SFSpeechRecognizer.init()
// unLocalizedSpeechRecognizer.supportsOnDeviceRecognition is most likely `false`

// change en-US to whatever locale you are targeting
var localizedSpeechRecognizer = SFSpeechRecognizer.init(locale: Locale(identifier: "en-US"))
// localizedSpeechRecognizer.supportsOnDeviceRecognition is most likely `true`
// if that local has been downloaded
Clorichel
  • 1,940
  • 1
  • 13
  • 24