Smart_Mirror
Smart_Mirror copied to clipboard
Smart_Mirror

Smart Mirror with AI as well as home automation.
Sourcerer
Open Source
Code Requirements
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
Setup Guide
Magic Mirror
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
AI
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.
Weather
For weather we are using darksky.net. You have to create your own developer account and get the API key.
What's the weather forecast?
Youtube
For enabling youTube, you need to get the youTube secret Key from the Google's developer Console. Add the key in the code.
Can you play me a video of Eminem?
Maps
For map, we are using Google maps. Types of map we support right now are :
- Normal
- Hybrid
- Satellite
- Terrain
Can you show me map of India?
News
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.
Can you show me the latest news?
Uber
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.
Can you book me an uber pool/go from Vimaan Nagar to Baner?
Zomato
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.
Can you show me restaurants in Pune?
SoundHound
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.
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?
Commands that you could use on the mirror
- 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?
API
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.
There are some easter eggs which you guys can find out and let us know in the forum.
Starting Up
Navigate to the AI-Smart-Mirror folder
cd AI-Smart-Mirror
Make sure MagicMirror is running, then start the AI
python bot.py
Setup Facial Recognition
Install openCV with
pip install cv2
Start the app
python bot.py
Working Example