Echo Dot (3rd Gen) - Smart speaker with Alexa - Charcoal

Use your voice to play a song, artist, or genre through Amazon Music, Apple Music, Spotify, Pandora, and others. With compatible Echo devices in different rooms, you can fill your whole home with music.

Buy Now

Wireless Rechargeable Battery Powered WiFi Camera.

Wireless Rechargeable Battery Powered WiFi Camera is home security camera system lets you listen in and talk back through the built in speaker and microphone that work directly through your iPhone or Android Mic.

Buy Now

JARVIS 101 : Let’s build some AI!


Pavan Teja Nagisetti

We all remember Jarvis! Jarvis is an interactive virtual assistant of Marvel Comics character IronMan. Virtual Assistants are all around us, be it in our smartphones, smart homes or on our websites. Chatbots are already dominating in majority of customer service roles as employed by Banks, Ecommerce giants and other B2C firms. Some companies are even considering chatbots for marketing efforts.

Merriam Webster defines AI is as “the capability of a machine to imitate intelligent human behavior”. So machine learning at its core is not about complex mathematical equations rather its about automation. When it comes to the recent advancements in AI, Deep Learning is considered to have shown a great promise in replicating human perceptions such as Vision, Auditory and Speech.

1. Knowledge graphs and Chatbots — An analytical approach.

2. Blender Vs Rasa open source chatbots

3. Designing a chatbot for an improved customer experience

4. Top 5 NLP Chatbot Platforms

Training deep learning algorithms is computationally heavy, but thanks to the deep learning community across the globe, there are many open-source implementations/solutions available for us to work with. So let’s do a little project to get some hands on AI.

Logical overview of the architecture

Required python libraries & packages.

The full project is available in my github repository here.


For the sake of simplicity, I had chosen weather querying as the context of usage for the chatbot. When you run the python code, The conversational AI would introduce itself and listen for your query. To simplify the project we shall listen for only 7 seconds. Once the bot receives your query, it will convert the Audio input into text using the SpeechRecognition Library in python.

We have to also accommodate the possibility that the query may not be accurate in which case the bot has to let the user know that the it did not understand the query and request the user to repeat the query.

Natural Language Processing

Once the user_query is converted to text, the bot will then process the identified text using the NLP package Spacy to extract intents and entities(To know more about Intents and Entities refer here). Below shown is the code to identify relevant entities like Geo_Loc(Geographical Location) and Time_date.


Once the relevant entities are identified and extracted, the bot will then ping the metaweather API to get the weather status. We will use a custom_string to generate the reply. The generated reply(text) shall be converted to speech using the python library gTTs. The code to which is shown below.

Date Parsing

Date parsing is another important aspect to successfully retrieve information from the metaweather API. I’ve made use of timefhuman and dateparser libraries in python to convert the date text into mm/dd/yyyy format. The code to which is shown below.

Hot-word Detection

Hot words or Trigger words like “Okay Google”, “Alexa”, “Hey Siri” is also important to have in a chatbot. While this is an interesting feature to have, it doesn’t affect the functionality of the bot. The open source implementation for Trigger word detection is explained in the Andrew NG’s Deep Learning course on “Sequence Models”. We will also need Deep Learning Package “Keras” to implement the model for hot word detection. I will be inculcating this feature later on.

Directions to use:

  • Install the relevant python packages
  • Clone the github repo.
  • Go to the directory in terminal.
  • Run the file in python.
  • Wait for the welcome text to be spoken.
  • Ask for weather status of a single city for a single date. Eg. “What’s the weather in New York, yesterday?” or “What’s the weather in Philadelphia, 4th of July 2015?”

Note: The bot can only work with the cities that are configured in the metaweather API. I found that there is an issue when working with locations with names that have two words. Eg: “San francisco” etc. Having said that, the bot works well for most major cities in the world.

Sources and References:

Thank you Google. 🙂

Thank you Spacy!

Thank you timefhuman — package(Python Library) for converting my date entities to numbers!

Lastly, Thank you for you time.

Read More


Please enter your comment!
Please enter your name here