Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SFSpeechRecognizer.requestAuthorization { [weak self] (authStatus) in
- var isAuthorization = false
- switch authStatus {
- case .authorized:
- isAuthorization = true
- case .denied:
- isAuthorization = false
- print("User denied access to speech recognition")
- case .restricted:
- isAuthorization = false
- print("Speech recognition restricted on this device")
- case .notDetermined:
- isAuthorization = false
- print("Speech recognition not yet authorized")
- }
- }
Add Comment
Please, Sign In to add comment