Is it possible to be integrate Alexa Skills Kit with iOS mobile app to trigger a event? - ios

For example, say I want to launch camera within my ios app to take a photo, Can I utilize ASK and iphone microphone to understand users speech command("launch camera") to launch camera and trigger a function within ios?

Short answer: No.
Long answer: Yes, but not really a good us case.
The Alexa Skills Kit is used to create an endpoint (skill) that the Alexa service can invoke to do something. The Alexa Skills Kit does not cover the acquisition and recognition of the speech. That all happens within the Alexa service.
The Alexa Voice Kit is a newly released kit that lets you do the other end. You can use it to integrate anything with a microphone into the Alexa service. Using this kit you can stream raw sound recorded from your microphone up to the service, and it will do the recognition and invocation of services.
So, in theory, you could use the Alexa Voice Kit and enable your iphone as a device that could send sound and invoke Alexa skills. You could use the Alexa Skill Kit to enable a web service that can be invoked by Alexa. You could do some sort of push/pull notification between your web service and your phone to trigger whatever you want. Then you would be able to invoke your Alexa skill with your iPhone, and have it do something on your iPhone.
Probably not where you really want to go. The better way to implement that use case is to use whatever speech recognition and trigger options iOS gives you and not via Alexa.

Related

How can I programmatically trigger an Alexa Skill intent?

I have a few smart devices that can all be controlled through Alexa (e.g. "Hey Alexa, turn on the fan to 50% speed"). Is there an API that I can use to programmatically trigger certain Alexa Skill intent. I know there is a way to use text-to-speech to do so, but that feels very janky, and I would love to know if there's a native API for Alexa intents that can be programmatically triggered.
No, Alexa does not expose an API. The whole point of Alexa and the Echo devices is to provide a voice interface which then calls an API to get things done. It seems like you want an API to trigger a voice response system that then calls an API to get something done.

How to send direct command from Google Home to custom smart device without app name?

I try to build my custom IoT device that will be controlled via Google Home device, and serve people with disabilities.
The device itself is Tiva C Launchpad, that I program from scratch, meaning I will have a full control on it.
In my vision, the user wil say something like: "Ok Google, press play button", and as a result, the Google Home device will send a direct command of press_play_button to the IoT device, preferably via the local network.
I found the Google Action SDK, alongside with the Local SDK extention, but if I understood correctly, I have to be in the app mode first ("OK Google, play {app_name}") before pronouncing the action I want, which is inconvenient.
Is there any way to achieve my requirement?
If not, I may give up on the local network control, and use sort of a webhook to send HTTP request to my smart device, and in that case I wonder if MQTT will be more suitable.
Thanks.
The Local SDK is an extension to the Smart Home API. If your device matches up with the device types and traits that the Smart Home API supports then you can use that to control your device.
It has support for media players so things like play/stop should be possible.
I have build generic Smart Home control using MQTT to reach the device, but you have to provide a HTTP endpoint for the Google System to interface with. This take a little thought as you have to map MQTT asynchronous approach to HTTP's synchronous nature.

Alexa skills kit interaction from my iOS app

After reading Alexa Skills Kit docs, i have some doubts. What is meant by Alexa-enabled device here?(My custom home automation device support Alexa api or how to change my hardware to support Alexa api?).
This Alexa-enabled device will communicate with Smart Home Skill API and then AWS Lambda Skill adapter communicate with real device.
I am able to create Alexa skills (may be custom skills or Smart Home Skill). How to communicate with this skills from my ios app?
Any device with a microphone, a speaker and a network connection can interact with Alexa.
The developer portal is https://developer.amazon.com/alexa-voice-service
A good code base to start with a raspberry pi is https://github.com/alexa/alexa-avs-sample-app
Alexa Voice Service is currently only available in US. We are working hard at making it available for our customers in UK and DE.
I believe it's any device with Alexa Voice Services, which right now would mainly be the Echo and Echo Dot: https://developer.amazon.com/alexa-voice-service/what-is-avs
But in the US you can theoretically Alexa-enable any capable device with a microphone and speaker. It's launching later in the UK and Germany.
There are several Amazon products that qualify as Alexa-enabled. Some of them are the Echo, the Echo Dot, the Fire Tablet, in its latest versions at least, but might be available in older versions through software update, not sure. The Fire TV and the Amazon Tap are also Alexa-enabled.
To your point, only Amazon products are Alexa-enabled. I must say that there is a way to run some sort of SDK, perhaps with Alexa Voice service, and enable a Raspberry Pi or any other capable hardware to act as an Alexa-enabled device.
Of course, that doesn't include the iPhone. To interact with Alexa from your phone, you'd have to create an intermediary backend, be that in a Lambda function or in your own server.

How can I get Alexa working on my iOS app?

I have been checking out the Alexa Skills kit the past few days. I have also been poring through the documentations for both the Skills kit and the Voice Service. I am just having a little hiccup trying to understand the flow. I have implemented one of amazon's sample skills (favourite colour sample) in the developer console and also wrote a sample lambda function to handle the type of response that will be delivered. Its working on the test simulator and what left is basically getting lambda running through my ios app. However I have the impression that I don't have to use the voice service. Am I wrong? I am quite confused, it would be awesome if anybody who has some more clarity could shed some light on the matter. If I get lambda working also, I think it will accept requests that are in a particular format. Where do I have to send the encoded audio to get a json response to send to the skills kit? To the Alexa Voice Service?
Also I am authenticating my app using cognito and dynamo db. If I were to use Alexa Voice Service, then it is mentioned that the user will have to also login to amazon. So do I still have to work with the login with amazon sdk? Or is there a workaround?
Based on Amazon documentation there are two ways to interact with Alexa:
Sounds like you want to implement the app thru the Companion method.
As far as the JSON goes, i am currently resolving that issue now, (will post answer once I have it resolved).
Basically you have to use AVFoundation to capture audio from iPhone and send 2 https messages to Alexa (One message with JSON Body & the second message with audio captured as body.) Bases on Documentation
Companion App
(You have a device (such as a smart speaker) that you want to add Alexa to. So, you build in support for AVS. Great! Now you need a way to authorize it and associate it with the user's account. This is the "companion app" approach. The companion app connects to your smart product and allows the user to login and authorize the speaker to use Alexa and connect to their Amazon account.)
Mobile OR Website
AVS App
(You don't have a device you need to authorize - instead you want to speak to Alexa from within your Android/Iphone application.)
Android or Iphone
You can find a swift example on github on how to implement a iOS AVS client
https://github.com/chintan1891/iOS-Alexa

What can we implement using native WebRTC in iOS? How much approx. time it will take in Screen sharing, Audio, Video and Text Chat implemetaion?

I want to develop a native iOS app using WebRTC that have almost similar functionality to skype. I have few queries :
Q 1) I know we can implement Audio and Video call using WebRTC but is
it possible to implement Text Chat and Screen Sharing in iOS app
using native WebRTC ?
Q 2) I need to provide time estimation of **Audio Call,Video Call,
Group Audio call, Group Video call, single user text(share media as well) chatting, multi user text (share media as well) chatting and
Screen Sharing.
Please let me know approx. development time of individual functionality if single developer works on it, who have good hands in iOS development.
Thank you....:)

Resources