Closed francoisdeberry closed 5 years ago
Oh ! Would it too much to ask for activity sensors permission too ? (accelerometer, pedometer etc.). It's an all-in-one permission for all sensors :)
Soon I added it. If you can create swift file with implement SPPermission protocol - it happen faster
Something like this ? The following is for SpeechRecognition permission.
import Speech
class SPSpeechRecognitionPermission: SPPermissionInterface {
func isAuthorized() -> Bool {
if SFSpeechRecognizer.authorizationStatus() == .authorized {
return true
} else {
return false
}
}
func request(withComlectionHandler complectionHandler: @escaping ()->()?) {
SFSpeechRecognizer.requestAuthorization {
status in
DispatchQueue.main.async {
complectionHandler()
}
}
}
}
About CoreMotion, there is no authorizationStatus method yet (Beta method) Apple (code example) launch a queryActivityStarting and check for error in the completion block to do this. I dunno if your system can handle an async response query inside its check method ?
Thanks for you, soon I added it in pod
any update ?
Hi Turk, I don't think that it has been integrated by the author yet. I personally forked the project and made a huge redesign but it's not quite PR-ready and I don't have time to clean it... If it's just the voice recognition you're looking for, it's not the hardest one to manually add. If I remember correctly, you just have to add the corresponding interface and some assets and you're up and running. GL
Hey !
Love your work, sincerely ! I need to ask the user for voice recognition (Speech Kit) API, could you add it ?
Thanks !