Git Product home page Git Product logo

presentoccupant / project_alias Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bjoernkarmann/project_alias

0.0 1.0 0.0 39.16 MB

Alias is a teachable “parasite” that is designed to give users more control over their smart assistants, both when it comes to customisation and privacy. Through a simple app the user can train Alias to react on a custom wake-word/sound, and once trained, Alias can take control over your home assistant by activating it for you.

Python 45.19% JavaScript 40.97% CSS 4.47% HTML 9.37%

project_alias's Introduction

Project Alias

Python 3.6 License: MIT

Project Alias is an open-source parasite to train custom wake-up names for smart home devices while disturbing their built-in microphone. Read more about the project here.

NOTE: this project is experimental and still in development.

Build Guide

For the complete step-by-step guide and 3D files see our Instructables.

Raspberry Pi Setup 🔧

How to prepare and setup a Raspberry Pi for this project:

  1. Download the latest version of Raspbian and flash your micro SD card with Etcher

  2. Copy the ssh and wpa_supplicant.conf files from the setup folder to the SD card (boot)

  3. Edit the wpa_supplicant.conf in a text editor to match your wifi settings. Insert the card to the raspberry pi

  4. In terminal ssh into the pi: sudo ssh [email protected]
    Default password is 'raspberry'. To change password use the 'passwd' command

  5. Update the pi: sudo apt-get update && sudo apt-get upgrade

  6. Reboot sudo reboot

Installing

On the Rapsberry Pi: clone and install the sound driver for the ReSpeaker hat:
This is only required when using the ReSpeaker hat, this code will also work with other sound drivers.

cd && git clone https://github.com/respeaker/seeed-voicecard.git
cd seeed-voicecard && sudo ./install.sh

Install Tensorflow and Keras:

sudo apt-get install python3-dev python3-pip git libatlas-base-dev 
sudo pip3 install tensorflow keras 

Install the required modules:

sudo apt-get install python3-numpy python3-spidev python-h5py
sudo apt-get install python3-pyaudio libsdl-ttf2.0-0 python3-pygame 
sudo pip3 install flask flask_socketio python_speech_features

Clone the Alias project:

git clone https://github.com/bjoernkarmann/project_alias.git

Setup a bootscript. Open this file:

sudo nano /etc/rc.local

and add at the end of the command just before exit 0, like:

cd project_alias && python3 app.py &

Now reboot the Pi to test it:

sudo reboot

Training Alias 🍄

  1. To train Alias use the browser on your phone and open raspberrypi.local:5050

  2. Hold down the record button while saying the new name about 4-6 times. A small bar should indicate the 2 seconds recording window. Each name should fit within this timeframe.

  3. Under the menu, click Train Alias and wait a few seconds for the model to learn the name. This name does not necessarily need to be a word but can be a sound and any language. So be creative! You can always reset your name on the menu. Tip: it helps to record the name from different locations in your home.

  4. Try it out! Say the name and ask your question once you see a blue light on the device or on your phone. Note: once trained there is no need to have the phone connected anymore.

If you find Alias is not responding correctly, try to train a few more examples. Or if you find Alias is triggering to often, you can go to the menu and turn background sound ON. This toggles the background mode and adds any new recordings to the background examples. Record and train just as before, but try to capture unique sounds in your environment or even words that sound similar to your chosen name.

Calibration

  • If you are using a Amazon Alexa, please change line 21 in app.py to: wakeup = sound.audioPlayer("data/alexa.wav",0,"wakeup", False)

  • To set the volume of the speaker you can change the line 32 in modules/sound.py os.system('sudo amixer -c 1 sset Speaker 83')

Get Involved!

We are both Interaction Designers, Makers and strong believers in privacy but no experts when it comes to Speech Recognition software. If you are interested in getting involved in version 2.0 please let us know!

Contributors

Made by Bjørn Karmann and Tore Knudsen.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

project_alias's People

Contributors

bjoernkarmann avatar torekndsn avatar 0xflotus avatar allanbreyes avatar

Watchers

Present Occupant avatar

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.