NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

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?


Hacking with Swift is sponsored by Play

SPONSORED Play is the first native iOS design tool created for designers and engineers. You can install Play for iOS and iPad today and sign up to check out the Beta of our macOS app with SwiftUI code export. We're also hiring engineers!

Click to learn more about Play!

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.