UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Hands-free voice control of iOS app

Forums > iOS

I'm working on an app, and I would like users to be able to use it hands-free in certain views. Basically, press a specific button with a voice command.

The scenario is similar to tracking inventory, so you'd have the app in an item's view, and as you go you'd tell the app something like "Increase", and the count of items would increase.

I looked into the Speech framework, and I can see them pressing a button when the inventory starts and pressing it again when it ends, but I don't know if a lot of ambient noise, people talking normally, and being on for maybe hours at a time is a good idea.

I also looked into shortcuts, but they seem to work even when your app is not open, so I don't see how that would work, since you need to select an item to count first.

Is there a way to do it more like Siri, where you'd say "Siri, increase" or "App name, increase" while on specific views in the app and it doing it?

3      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.