I'd like an alarm to go off based on my custom alexa skill. Is it possible to set a timer similar to manually asking Alexa to set a timer through a skill?
No, that is not currently possible, but Amazon is certainly are of developers desire for this.
Your skill sends responses to the user within the context of a request - it can't initiate new output minutes later.
You might be able to do something hacky with a very long response or with the new audio streaming capability but I don't think that would get you what you want.
Related
I got confused with the right data flow when I have a backend API and a redux state that passing the data to the components.
The question is: What is the right methodology to handle 2 data resources, API and Redux?
should I update the state and then fire a send request to the API with the update?
or, let the redux send that request for me every time the state changes?
or, should I update the API directly and then fire a get request to update the Redux store?
I'm really confused and do not know what is right approach should I take with less error in the future use
Appreciate any help, even sending me an article that talks about this issue and I'm gonna read it
Thank you
should I update the state and then fire a send request to the API with the update?
That's called "optimistic update", the advantage is that your app feels fast and responsive, since the network delay is hidden from the user. The downside is that the request might fail and you have to undo what the user did and inform them that it failed. For simple operations (for example marking a product as a favorite in an ecommerce website) this works great in my opinion.
To explain how it works with the example in mind:
User action triggers update of redux state (product is immediately shown as favourite on the page)
At the same time, an API request is fired to favourite the product on the backend side.
You fetch the product data again from the API and render it
Now either the request has successfully changed the product, so visually nothing changes on the page for the user - to them it looks like the operation happened without network delay - Or the request failed and you show the old state where the product is not a favourite and and error message appears.
or, let the redux send that request for me every time the state changes?
Parts of redux-toolkit embrace this approach if I'm not mistaken. If you decide to go down this road, I'd recommend to not implement it yourself but instead rely on existing libraries/middlewares.
or, should I update the API directly and then fire a get request to update the Redux store?
This is the classic, safe, and simple approach.
My advice is:
If you have lots and lots of CRUD operations against your API, and you want to not write lots of boilerplate code, look into redux-toolkit (specifically https://redux-toolkit.js.org/rtk-query/overview ).
If you care about perceived performance of your app, try optimistic update.
If you want to keep it simple and just get things to work, follow the classic approach.
How to set reminder for day(Weekdays like Monday, Tuesday etc..) and time in Alexa using IBM Watson Assistant? I am able to set date and time in IBM Watson Assistant using system entities like #sys-date and #sys-time.The context variables like $day and $time have been used to fetch and store the data. Challenge is that Alexa must fetch these values and set the reminder. Please help.
Specific points for which help required is:-
Setting the reminder for day and time in Alexa using IBM Watson assistant.
If reminder already exists then Alexa must be able to tell that. Still user intends to set another reminder, then Alexa must be able to set the fresh reminder.
If user intends to cancel the existing remidner. Then Alexa must be able to cancel that from Watson Assistant.
Forgive me I am not 100% sure what you are asking, so if I have this wrong forgive me. I take it from your posting that you have linked your Alexa instance back to an instance of Watson. ( Which is doable as developer, but Amazon at present will not allow this to become an Alexa Skill). If I understand right, you then wish to call back into Alexa and set up a reminder for a time and date. I have not tried this, (but may do so for my Alexa+Watson demos), but expect you would need to call out via a cloud function or AWS lambda to the Alexa Reminders API and then understand the response from this call out, and then return a message back to Alexa.
Hope this answers your question.
I'm relatively new to Alexa and AWS. I'm trying to save data generated by a RequestHandler to use it later in another Handler. I know how to use the SessionAttributes, but this only works, if the skill isn't terminated meanwhile and since i can't increase the timeout, i need another solution. I read in another post, that you can save something in some DB, but i don't know how he did that:
Alexa Skills Set SDK - increase timeout of skill
Can anyone recommend a tutorial or documentation for something like that?
Btw i use nodejs and sdk v2
You are correct.
If you are trying to save the data somewhere, like a database, it is better to use Dynamo DB.
Here's a link to the tutorial on adding Memory to your skill. Hopefully this helps.
I would like to have a custom skill, but it would need direct access to the users voice (our output of a recorded audio). Can/will Alexa relay the stream rather than sending the request invocations (launch/intent/session-end)?
I understand custom skills can send back mp3s as responses, but being able to gain access to the actual voice requests, either the stream or a mp3, would be awesome.
Edit:
It seems that there is not a provided mp3 in the request object: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/alexa-skills-kit-interface-reference#LaunchRequest
Alexa does not provide this service.
Having an always-on device in a domestic setting, that can hear everything said, plus background noise, and side conversations, is a huge security concern. Amazon mitigates this concern by filtering the input, performing the difficult Speech-to-text work, and only providing the resulting text. (After further processing by your interaction model.)
In short, no - I can't find anywhere specifically in the documentation but I just created a Python library that encapsulates all the JSON structures, so I know you can't do this yet.
The only control over audio is 'output' through embedding links in SSML.
https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/handling-requests-sent-by-alexa#Including%20Pre-Recorded%20Audio%20in%20your%20Response
I am looking for a product to solve a particular task and I'm having a hard time sorting out which product or type of product can accomplish the task. I am looking for something to handle POSTing notifications via HTTPS.
One of my use cases is a mechanical turk type scenario. A client will request a task be started via an API call. A human will get this request do the task, tell the system the task is complete, and the system will send a HTTPS POST to a subscriber. So it's a long-running async request.
I am looking for something that will take care of making this POST for me. I would like something that is reliable and durable. Of course I can write the POST myself, but all of the other niceties that come with a queuing application would be nice to have (and I don't wish to implement all that myself).
I have been looking at a number of queuing, MOM, and ESB products. From what I can tell the queuing products don't seem to push notify over HTTPS and the MOM and ESB are a little too heavy handed I think. For example I think BizTalk will do what I need but that has a lot of overhead. The one solution I did find was Amazon's Simple Notification Service, but that appears to only send from the amazon.com domain, but I want the messages to be sent from my domain.
Can anyone help identify a product that will help? Maybe I'm just overlooking something, not sure what I am looking for, or have to choose a different way of implementing this.
The answer I was looking for was webhooks. Here's a great presentation on what they are and how they can be utilized.
if you want a serverless way to do webhooks, check out IronWorker's webhook support, here's an article on it: http://blog.iron.io/2012/04/one-webhook-to-rule-them-all-one-url.html
nginx has a messaging module that may be just what you need.