Implementation of Planned Actions in SUSI.AI Android Client
What do you understand by “Planned Actions”? Is it something required to do something according to plan? Is it something that needs to be done at a particular time? Yes, it is. “Planned Actions” is a feature present in the SUSI.AI android app that helps to schedule tasks. Yes, you heard it right! It helps to schedule the task. We can schedule some events like “setting an alarm after one minute”, “playing music after one minute”, etc. Such events require scheduling of different events at different point of time. SUSI.AI is a smart assistant. It answers the queries that the user asks for, play music, etc. Additionally, the project also has a smart speaker part, which is very similar to Google Home. A smart speaker often has the ability to perform certain task other than answering normal queries at a scheduled time. During my GSoC period, I got the opportunity to implement such a feature of scheduling task in the SUSI.AI android app. What is the scheduling of task or planned action? Scheduling of task or planned actions is nothing but performing some kind of task at a scheduled time. Let’s consider “set alarm in one minute”. This means an alarm should be set that should ring up after one minute. Let’s see how it has been implemented in SUSI. First of all, we need to have a skill that would respond to the query asked. Consider, the skill “rocket launch”. The response for this skill is: { "query": "rocket launch", "client_id": "aG9zdF8xNzIuNjguMTQ2LjE5MF80YTk0OGY4OA==", "query_date": "2019-08-19T17:31:53.670Z", "answers": [{ "data": [ { "0": "rocket launch", "token_original": "rocket", "token_canonical": "rocket", "token_categorized": "rocket", "timezoneOffset": "-330", "language": "en" }, { "0": "rocket launch", "token_original": "rocket", "token_canonical": "rocket", "token_categorized": "rocket", "timezoneOffset": "-330", "language": "en" } ], "metadata": {"count": 2}, "actions": [ { "language": "en", "type": "answer", "expression": "starting countdown" }, { "expression": "twelve", "language": "en", "type": "answer", "plan_delay": 1000, "plan_date": "2019-08-19T17:31:54.679Z" }, { "expression": "eleven", "language": "en", "type": "answer", "plan_delay": 2000, "plan_date": "2019-08-19T17:31:55.681Z" }, { "expression": "ten", "language": "en", "type": "answer", "plan_delay": 3000, "plan_date": "2019-08-19T17:31:56.681Z" }, { "expression": "nine", "language": "en", "type": "answer", "plan_delay": 4000, "plan_date": "2019-08-19T17:31:57.682Z" }, { "expression": "ignition sequence starts", …
