Smart Mirror with AI as well as home automation.
The example code is in Python (version 2.7 or higher will work).
- import speechrecognition
- import gtts
- import py4j
- import python-dateutil
- import pydub
- import feedparser
- import numpy
Download the stable version of Node.js: https://nodejs.org/en/
Clone the latest MagicMirror code from: https://github.com/MichMich/MagicMirror
Navigate inside the MagicMirror folder
cd MagicMirror
Install MagicMirror dependencies
npm install
Verify it starts
npm start
Clone this repository (AI Smart Mirror)
git clone https://github.com/akshaybahadur21/Smart_Mirror.git
Copy the folders in Smart_Mirror/magic_mirror
to MagicMirror/modules
Copy the config.js
file in Smart_Mirror/magic_mirror
to MagicMirror/config
We are using wit.ai for generating intents out of the text. You need to generate an access id using which, you can send GET requests to get intents.
For weather we are using darksky.net. You have to create your own developer account and get the API key.
For enabling youTube, you need to get the youTube secret Key from the Google's developer Console. Add the key in the code.
For map, we are using Google maps. Types of map we support right now are :
- Normal
- Hybrid
- Satellite
- Terrain
For news, we use Google news and the location has been set to IN (INDIA). You can change it according o your country to get the latest news.
You can directly book an uber and get the arrival map using this module. You need to get the API Key, Client Secret, Oauth Key and paste it in the code.
For zomato, you need to get the API key from zomato's dev site. And paste it in the code. You can view the list of available restaurants in a region.
For various other tasks, we have used soundhound's api. The soundhound service is quite effective and fast. Operations that could be done using soundhound:
- Solving Mathematical equations
- Stock Market
- Hotel Enquiries.
- Can you play me a video of Eminem?
- Can you book me an uber pool/go from Vimaan Nagar to Baner?
- Can you show me restaurants in Pune?
- Can you show me the latest news?
- Can you show me the weather forecast?
- Can you show me map of India?
- Can you tell me a joke?
- How do I look?
- Show me your face.
- What are the roots for x^2-x+1
- What are the stock prices and market cap of Google, Apple and Microsoft.
- Can you show me hotels in New York that have a swimming pool for next Monday?
- Who's Sachine Tendulkar?
Different APIs have been used for different services. You are required to create an account and get the respective keys from the providers. You have to place the keys in the code. The instructions for the same are given in the code.
Navigate to the AI-Smart-Mirror folder
cd AI-Smart-Mirror
Make sure MagicMirror is running, then start the AI
python bot.py
Install openCV with
pip install cv2
Start the app
python bot.py