Does Apple provide an API for SIRI? - ios

Is it possible that Apple does or will provide an API for Siri? It would be great if I can be sipping my coffee and say,
User: Hey Siri, could you please open Angry
Birds; Level 4 and throw a first bird for me. Make sure you at least hit one green pig or it's coming out of your paycheck.
Siri: Yes sure, I will do that for you.
Is this possible? And would you think Apple will provide this to us?

THIS IS NO LONGER ACCURATE:
There is no API and there is no indication of it changing anytime soon. There are private headers that you can look at by decompiling the SDK. This is a great synopsis:
Quora
You can be clever like RTM though, this is as close as it gets:
http://www.rememberthemilk.com/services/siri/

In iOS 10, Apple has announced an API for Siri called SiriKit. However, you can only do it as an app extension and only if your app implements one of the following types of services:
Audio or video calling
Messaging
Payments
Searching photos
Workouts
Ride booking
Climate and radio
SiriKit is a way for you to make your content available through Siri.
It also lets you add support for your services to the Maps app. To
support SiriKit, you use the Intents framework and Intents UI
framework to implement one or more extensions that you then include
inside your iOS app. When the user requests specific types of services
through Siri or Maps, the system uses your extensions to provide those
services.
This means SiriKit cannot be used for the scenario mentioned in the question and in ways that many of us would like.
Source: Apple Docs for SiriKit

When the iPhone was first released, there was absolutely no public talk from Apple about custom app development. The delayed release of the SDK gave them plenty of time to get public feedback on the iPhone user experience and make the SDK ready for public use.
It seems likely that they're taking a similar approach with Siri.

Not yet. If you want it, file a feature request at bugreport.apple.com, and briefly describe what you want it for. The more people ask for it, the more likely it is to happen.

Related

Siri full sentence order, like sending message via whatsApp

I have been searching for days about Siri integration with an IOS app.
I know about the Siri shortcuts/intents etc.
How do I have Siri take a full sentence such as "Text John I'm on my way" or "Text John via WhatsApp I'm on my way"
Is this something exclusive to Apple apps, is it limited to messaging only or are there other ways to integrate with Siri?
I'm not looking to integrate messaging app, but i'm looking to integrate the full sentence with parameters order/question.
Apple provides SiriKit which gives your application the ability to requests that originate from Siri.
You can look at the Human Interface Guidelines to learn more about designing an interface to interact with Siri.
Do some searcing on SiriKit examples. There are quite a few sources that show how do to an integration with your app.
If you are looking for information about speech recognition within your app, then you may want to look at the Apple Speech Framework
This framework gives you lower level voice recognition and parsing capabilities and may have the flexibility you need.
Hope this helps!
Messaging is not specific to Apple apps.
You can make your application to behave similar to Message app. You need to implement the app extension specific to message intent and add resolve param methods to the handler to handle user input.
Reference for Messaging with SiriKit
https://developer.apple.com/documentation/sirikit/messaging?changes=latest_minor
https://developer.apple.com/documentation/sirikit/insendmessageintent
Sample source - https://www.techotopia.com/index.php/An_iOS_10_Example_SiriKit_Messaging_Extension
https://medium.com/ios-os-x-development/extending-your-ios-app-with-sirikit-fd1a7ef12ba6

iOS SDK can you mute or cancel incoming calls

I found various threads here about how muting or canceling incoming calls (or messages) with the iOS SDK is not possible, due to the fact that Apple doesn't want an app to access system level settings. Well in fact not possible with the official tools, which means that if you somehow manage to do it, your app will not be accepted in the iTunes store.
Well I have been asked to assess the possibility of such an app that could do just that. Namely my client has seen these two apps
https://itunes.apple.com/us/app/lifesaver-distracted-driving/id874231222?mt=8
https://itunes.apple.com/us/app/at-t-drivemode/id907208943?mt=8
And they are sure that an app, basically exactly like these (based on the functionality) can be made.
So here I am, asking, how did these two apps succeed at the impossible and also how did they manage to get those apps uploaded to the iTunes store, if muting your phone is not an Apple approved option? I am not really asking for source code, although I am certainly not rejecting examples, but moreso I am asking for pointers of what class or book or documentation do I have to look up to figure out if this is possible? Apples CTCall and CT* classes did not seem to help me much.
K
Apple added the CallKit framework in iOS 10 to allow app developers to do this sort of thing, among others. For docs, see:
https://developer.apple.com/reference/callkit
It is now possible to detect and block unwanted phone calls from iOS 10 and above.
See the CallKit framework
The CallKit framework (CallKit.framework) lets VoIP apps integrate
with the iPhone UI and give users a great experience. Use this
framework to let users view and answer incoming VoIP calls on the lock
screen and manage contacts from VoIP calls in the Phone app’s
Favorites and Recents views.
CallKit also introduces app extensions that enable call blocking and
caller identification. You can create an app extension that can
associate a phone number with a name or tell the system when a number
should be blocked.

Sirikit supported services and its extended usage

I have a roadside assistance service application. It has some of the functionalities similar to ride booking app(Eg. Uber). How far can i leverage iOS 10 Sirikit? May be, apple can reject it. But i need to know the technical feasibility.
My application's functionality - I am struck in the middle of road with a flat tire. I need a tow assistance for my car. I give my current location and i ask my app to tow to my preferred dealer location. I pay for the service and wait for the provider to respond. I receive continuous updates from my service provider regarding the driver.
1st Step tried: I am trying to open my app with the statement "Siri, get a roadside assistance for my flat tire". I need to open my app and capture FLAT TIRE as a parameter. But I couldn't.
I tried using AppIntentVocabulary.plist. It was not working. I am missing something and there are no complete tutorials over the internet. Any help is much appreciated.
Sample Project:
Github Link for my simple Siri Integration:
https://github.com/vivinjeganathan/SiriExample
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.
SiriKit is a way for you to make your content available through Siri. It also lets you add support for your services to the Maps app. To support SiriKit, you use the Intents framework and Intents UI framework to implement one or more extensions that you then include inside your iOS app. When the user requests specific types of services through Siri or Maps, the system uses your extensions to provide those services.
Add SiriKit support only if your app implements one of the following types of services:
Audio or video calling
Messaging
Payments
Searching photos
Workouts
Ride booking
Check this Link: http://airflypan.com/foundation-course/233
http://airflypan.com/foundation-course/233
You really can't do this in any sensible way for the user. Although you app's usecase will map to ride-hailing intent the vocabulary will not. Siri gives you almost no options to influence the vocabulary she is using to communicate to your User. If you could only teach you users that requesting a tow is actually requesting a ride... :)
Apple have analyzed the domains they are supporting and the vocabulary that is used in these domains and "taught" them to Siri in every language/culture that Siri is supporting. This makes total sense from Apple's point of view because you'd be hard pressed to be able to do this yourself.

Can we use sirikit for record audio?

I want to implement audio recording functionality in one of my application. is it possible using sirikit ? I don't find any tutorial for recording through sirikit right now.
Is someone can provide good tutorial on sirikit?
Right know you cannot do this in way: "Hey Siri, start voice recording" or similar way.
SiriKit Programming Guide says:
SiriKit support is divided into domains, each of which defines one or
more tasks that can be performed. In order to support SiriKit, apps
must support one of the following domains:
VoIP calling
Messaging Payments
Photo
Workouts
Ride booking
CarPlay (automotive vendors only)
Restaurant reservations (requires additional support from Apple)
NOTE that you cannot create a Siri extension for a macOS projects right know (for the time of writing this answer), despite that INIntent supports macOS.
Is someone can provide good tutorial on sirikit?
IMHO, the best tutorial on SiriKit right know is an official documentation and projects:
SiriKit
SiriKit Programming Guide
Intents Framework
IntentsUI Framework
IntentHandling: Using the Intents framework to handle custom Siri request
UnicornChat: Extending Your Apps with SiriKit
You can't record audio using sirkit. However, you can add a button in your application by pressing which you can start recording the audio, there is limit of max 1 minute per instance

Voice Control iOS

I would like to build a simple reader app for the iPad 2 that would allow users to navigate/read via voice controls. The app would allow the user to enter a mode where the microphone was live and listened for predefined keywords like 'down', 'up', 'next', 'back', 'home', etc.
I don't want to reinvent the wheel on this so I'm just wondering first, if someone has done this already and if not, are there any good tutorials or SDKs available to help with recording someone's voice, and then comparing future output to see if it matches, or just dealing with the microphone in general?
Let's put aside that this is a fairly vaguely worded question for the moment.
If you are expecting to allow voice control in your app that somehow works throughout the entire device, it's just not possible. Your app would only work to control itself -- or at least itself and whatever external hooks you can normally get to the rest of the device, like, say, playing a song out of the user's iTunes library.
If you're planning on doing this in a jailbroken environment, then you should find some open-source library that does voice recognition -- if there are any -- and start from there. Be prepared for a very long haul, though.
Dragon Mobile SDK is what you're looking for.
http://dragonmobile.nuancemobiledeveloper.com/
There maybe others voice recognition SDKs out there, but this is the only one I can think of from the top of my head.
You can find a library called CMU Sphinx. There's an iphone version for it called
PocketSphinx. See if it fits your needs.
I would like to build a simple reader app for the iPad 2 that would allow users to navigate/read via voice controls.
The iOS 13 new feature Voice Control fully meets your request because you can control your device and your app with your voice exactly the same as with touches.
It's also possible to define actions for some specific words for instance.
The device settings are perfectly well detailed to handle this amazing new feature (Accessibility - Voice Control):
If you need dedicated names to be read out in your app, use the accessibilityUserInputLabels property to define them.
That's definitely the built-in tool your need to reach your goal: no need to use external library or SDK, everything is natively provided. ;o)

Resources