Introduction:

Technology is shifting so fast and rapidly that now everyone can afford their own personal AI assistant now. One of the assistant available out there on the market is Alexa, which is getting smart everyday and is playing a vital role in voice first applications. Travel info is one such skill which is aimed to help the user more easily and affectively than using a mobile phone.

What it does:

Travel Info will provide us with driving time and driving distance with some additional information where ever available to a given address based on real time traffic conditions and times. It can also provide us the same details to any near by place like restaurant, subway, airport, pharmacy, Mexican restaurant the list goes on.

Things used in these projects:

Hardware Components: Amazon Alexa Amazon Echo

Software Apps and Online Services: Amazon Web Services - Lambda Amazon Web Services AWS S3 Amazon Web Services AWS RDS Amazon Alexa Alexa Skills Kit

How To Use:

Once you start the skill it will ask you for the address where the Alexa is placed at. That address will be used for all the requests which come in.

From there you can ask it for how long it takes to get to a address or to a nearest place.

Background:

We have seen really good advertising of asking Alexa how is the transit to work or something similar. Why not extend that to use it to know the same for any nearby major destinations or to find a near by favorite restaurant chain. That was the motivation for us to work on and develop this skill. Alexa is smart to recognize the address and render the correct travel times to the destinations.

Technology Stack:

Python (Flask-Ask) - We have used flask ask to create a python WSGI application which is very easy to pick up, test and deploy. AWS RDS - We have used a Mysql instance which stores the data of a particular users location and uses it as a reference.

I have got a blog post on how to use flask-ask along with mySQL database here. It also shows how to run the code on your local environment to debug the code.

AWS Lambda - We used the serverless microservice since its integration with the Alexa Skill kit is very reliable and me personally being a developer need not have to maintain the servers at all. Zappa.io - We have used zappa to deploy my WSGI python application onto lambda. It is very easy and have been able to maintain three instances of my application i.e Dev, QA and Production.

Challenges we ran into

Some weird characters in the names – there are some restaurants with characters/phrases from languages that Alexa does not recognize which have caused Alexa to not render the correct information. We tried to do as much as possible. Alternatively we have also provided the user to say the address to that place to which we can provide the travel information.

Future Considerations

We are planning on doing the following implementation:

  1. We are planning on extending the skill to also store a second reference location (ex: first can be home and second can be work) travel times as well.
  2. We are planning on letting the user get a point to point travel information as well.
Share this project:

Updates