Giter VIP home page Giter VIP logo

smart_mirror's Introduction

Smart_Mirror

Smart Mirror with AI as well as home automation.

Sourcerer

Open Source

  1. MichMich MagicMirror

Code Requirements

The example code is in Python (version 2.7 or higher will work).

  1. import speechrecognition
  2. import gtts
  3. import py4j
  4. import python-dateutil
  5. import pydub
  6. import feedparser
  7. 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 :

  1. Normal
  2. Hybrid
  3. Satellite
  4. 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:

  1. Solving Mathematical equations
  2. Stock Market
  3. 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

  1. Can you play me a video of Eminem?
  2. Can you book me an uber pool/go from Vimaan Nagar to Baner?
  3. Can you show me restaurants in Pune?
  4. Can you show me the latest news?
  5. Can you show me the weather forecast?
  6. Can you show me map of India?
  7. Can you tell me a joke?
  8. How do I look?
  9. Show me your face.
  10. What are the roots for x^2-x+1
  11. What are the stock prices and market cap of Google, Apple and Microsoft.
  12. Can you show me hotels in New York that have a swimming pool for next Monday?
  13. 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

Refer to this guide

Install openCV with

pip install cv2

Start the app

python bot.py

Working Example

smart_mirror's People

Contributors

akshaybahadur21 avatar cowboysdude avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smart_mirror's Issues

Error in houndify.py

Traceback (most recent call last):
File "bot.py", line 132, in decide_action
self.__hound_action(speech)
File "bot.py", line 625, in __hound_action
command = response["AllResults"][0]["WrittenResponseLong"]
KeyError: 'AllResults'

When I run bot.py and give some random input this is error is thrown

Python bot.py

I got this error. Are there any dependencies to install for this like python library?
$ python bot.py
Traceback (most recent call last):
File "bot.py", line 13, in
from apiclient.discovery import build
ModuleNotFoundError: No module named 'apiclient'

python bot.py

Used wrong endpoint for microphone debugging
Traceback (most recent call last):
File "bot.py", line 679, in
bot.start()
File "bot.py", line 49, in start
requests.get("http://localhost:8090/clear")
File "/usr/local/lib/python2.7/dist-packages/requests-2.18.4-py2.7.egg/requests/api.py", line 72, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests-2.18.4-py2.7.egg/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests-2.18.4-py2.7.egg/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests-2.18.4-py2.7.egg/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests-2.18.4-py2.7.egg/requests/adapters.py", line 508, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8090): Max retries exceeded with url: /clear (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f3c58e6aa90>: Failed to establish a new connection: [Errno 111] Connection refused',))

Error: Could not find or load main class Py4JServer

Error: Could not find or load main class Py4JServer
Traceback (most recent call last):
File "bot.py", line 22, in
from nlg import NLG
File "C:\Users\sid_g\MagicMirror\AI-Smart-Mirror\nlg.py", line 7, in
gateway = launch_py4j_server()
File "C:\Users\sid_g\MagicMirror\AI-Smart-Mirror\py4j_server_init_.py", line 34, in launch_py4j_server
_port = int(_pid.stdout.readline())
ValueError: invalid literal for int() with base 10: b''

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.