Most of you are already aware of Jarvis from Iron Man movie. Who doesn’t need a Jarvis, isn’t? And so the scripting begins…
I though of building an AI but realized it will take lot of time to teach the machine, so I made use of WolframAlpha. For those who are not aware WolframAlpha, it’s a website which finds new way to get knowledge and answers – not by searching the web, but by doing dynamic computations based on a vast collection of built-in data, algorithms, and methods. And they provide a free API.
My python code makes use of Google’s Speech Recognition module and listen to the question from the user. Then the code convert this question to text and the text is thrown at wolframalpha using its API. The API returns the answer which is again read out by using text to speech conversion.
To make it simple to use, I build a simple GUI using Tkinter module of python.
— Abhijit Bangera (@abhijitbangera) January 1, 2017
Note: The code is developed and tested in Python2.7. The code takes care of question and answer only. It will fail if we expect the answer to be an image/audio/video.
You can download the code from GitHub: CLICK HERE
Before you run the code, make sure you install all the required modules mentioned in requirement.txt file. Also register yourself at wolframAlpha and update the wolframAlpha API code in the file (variable name: app_id).