It requires iOS 13. Here's the code that does it:
var req: SFSpeechRecognitionRequest;
if #available(iOS 13, *) {
req.requiresOnDeviceRecognition = true
}
And the docs link: https://developer.apple.com/documentation/speech/sfspeechrec...