2

Currently, I am working on developing the iOS App that triggers an event upon voice command.

I saw a camera app, where a user says "start recording," then the camera starts to the recording mode.

This is an in-app voice control capability, so I am thinking it is different from SiriKit or SpeechRecognizer, which I have already implemented.

How would I achieve it?

My question is NOT the voice dictation where a user has to press a button to start dictation.

App needs to passively wait for a keyword, or intent, which is something like "myApp, start recording" or "myApp, stop recording", then the app starts/stop that event function accordingly.

Thanks.

XLE_22
  • 5,124
  • 3
  • 21
  • 72

2 Answers2

1

OpenEars : Free speech recognition and speech synthesis for the iPhone.

OpenEars makes it simple for you to add offline speech recognition in many languages and synthesized speech/TTS to your iPhone app quickly and easily. It lets everyone get the great results of using advanced speech app interface concepts. Check out this link. http://www.politepix.com/openears/ or

Building an iOS App like Siri https://www.raywenderlich.com/60870/building-ios-app-like-siri

Thank you.

Sommm
  • 527
  • 4
  • 22
  • Thanks for the sample link, but even in this video, a user has to tap on the mic button to activate the dictation. I would like a hands off capability where a user says "Hey myApp" then, "Find a Japanese restaurant", etc. – Erika Ishikawa Nov 29 '16 at 08:44
  • 1
    No, this is not possible in a iPhone. Siri might have some capabilities built-in but Apple has so far not exposed any such API's to app developers. OpenEars Framework might understand what the user is talking but there is no way to open an App based on that. For a jailbroken iPhone there is a possibility to do this. VoiceActivator for iOS allows voice controlled commands. But it wont run on a normal iPhone.... sorry – Sommm Nov 29 '16 at 09:45
  • 1
    No, I know it is possible because I have an App on my iphone which does this, and my iPhone is not jailbroken. With that App, I can register the initiating intent keyword, and when I say that keyword, it starts to record my voice. Then I can record my voice afterward without ever touching a screen. – Erika Ishikawa Nov 29 '16 at 13:22
  • @ErikaIshikawa , did you find a solution for this? Am in need to develop something similar on both iOS and Android. Any help would be much appreciated. – csharpnewbie Apr 11 '17 at 15:58
  • @ErikaIshikawa did you find the solution ?? i am facing the same problem – Zakaria Darwish Jul 14 '18 at 18:31
1

How would I achieve it?

There's an iOS 13 new feature called Voice Control that will allow you to reach your goal. enter image description here

You can find useful information in the Customize Commands section where all the vocal commands are available (you can create a custom one as well): enter image description here

For the example of the camera you mentioned, everything can be done vocally as follows: enter image description here I showed the items names to understand the vocal commands I used but they can be hidden if you prefer (hide names).

Voice Control is a built-in feature you can use inside your apps as well.

The only thing to do as a developer is eventually adapting the accessibilityUserInputLabels properties if you need specific names to be displayed for some items in your apps.

If you're looking for a voice command without pressing a button on iOS, the Voice Control is THE perfect candidate.

XLE_22
  • 5,124
  • 3
  • 21
  • 72