Introduction: Project Alias
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.
In this instructions, we will walk you through the main steps to complete your own Alias and start training a new wake-up-word for your smart device.
Step 1: Requirements and Materials
The main components used in this build are:
- 1x Raspberry Pi3 A+
- 1x Raspberry Pi charger 5v (white)
- 1x ReSpeaker 2-Mics Pi HAT
- 2x Tiny Speaker 16mm, example
- 4x small wood screws (ca. 2 x 10mm)
- Micro SD card
JST 2.0 connector or an old Jack cable
Tools needed for this project are:
- Access to a 3d printer
- Soldering iron
- Wire stripper
- A way to flash a micro SD card on your computer
Note: this project has only been tested with these components.
Step 2: 3D Printing the Shell
For this step, we will be 3D printing the shell
For now, we have provided 2 options:
- Google Home (original)
- Amazon Echo
1. Print the shell and speaker holder in any color on a 3D printer. Because of the mesh in the object, it is important to keep the support material at a minimal. We had the best result printing it on its back-side. (See picture)
2. Use sandpaper to give the shell a nice and smooth surface. (optionally give it an acetone bath)
Step 3: Wiring and Assembly
Before assembling the Alias we need to connect the speakers to the ReSpeaker audio shield and a power supply to the Raspberry Pi.
1. The speaker wires are stripped and soldered on to a JST 2.0 connector or an old Jack cable. The speakers and wires snap into the 3D printed speaker holder. (See picture above).
Note: We have found that the wires could trigger the Google Home when placed in the center. So for a better result on a Google Home try to route the wires down the sides.
2. Next, we need to supply 5V to the Raspberry Pi. Since there is not much space inside the shell, we decided to solder the 5V and Ground to the GPIO pins directly. You could try with an angled or modified micro USB cable. There is a small dent in the shell to route the wire out. Depending on your wire some fitting may be required.
3. Mount the speaker holder and Raspberry Pi to the shield with 4 small wood screws. (Tighten gently to prevent the 3D print to crack)
4. Place the assembled Alias on your device. If the fit is not smooth give the inside edge some sandpaper. It's important to align the speakers with the microphones of your device.
Step 4: Software
In this step, we will be adding the software to the Raspberry Pi.
Please follow the steps on the projects GitHub page.
The code is set to be used with a Google Home from default. If you plan to use it on an Amazon Echo please change line 21 in app.py to use the alexa.wav file.
Amazon: sound.audioPlayer("data/alexa.wav",0,"wakeup", False)
Google Home: sound.audioPlayer("data/google_home.wav",0,"wakeup", False)
Step 5: Train and Calibrate
In this step, we will train Alias with a custom wake-up word.
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.
Second Prize in the
Safe and Secure Challenge