WWDC22 SALE: Save 50% on all my Swift books and bundles! >>

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?


Save 50% in my Black Friday sale.

SAVE 50% To celebrate WWDC22, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

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.