Project Alias

76,132

236

65

About: I am creative technologist at Tellart, living in Amsterdam

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:

Tools needed for this project are:

  • Access to a 3d printer
  • Soldering iron
  • Wire stripper
  • Screwdriver
  • A way to flash a micro SD card on your computer

Note: this project has only been tested with these components, but if you are confident with making, parts can be changed for others.

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.

Safe and Secure Challenge

Second Prize in the
Safe and Secure Challenge

Share

    Recommendations

    • Games Contest

      Games Contest
    • Barbeque Challenge

      Barbeque Challenge
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    65 Discussions

    0
    None
    jdrabikAnthonyR196

    Reply 8 days ago

    I've looked but found nothing. The current design doesn't fit Dot. You might try Prusa Slicr (or FreeCAD or MeshLab) to
    scale the STL but the angle top is still a problem and speaker
    placement is incorrect for the Dot. A new design is needed both for fit, and
    due to errors in the downloaded STL (after multiple attempts, it just
    will not print past about 8 mm in height, regardless of orientation. It
    also pops off the print bed unless a brim (of about 20 mm) is added.
    And that's on a Prusa MK3S, same as shown in their pictures. I even
    tried to line up the holes so they'd look like those in the picture but
    no luck. Worse, after about 8 mm, the extruder stops extruding - I have
    not experienced this with any other 3D model/STL. Others report
    problems with the software too, including installation problems.
    The instructions on Git need improvement. Reading through the
    code, and to answer a question somebody else had, it does not appear
    that a server connection is needed, as the neural network is resident on
    the RPi (but it's not working here yet either). The Echo (or Dot, if it can be made to work) will of course
    still need wireless access. The RPi should only need it for ssh to build and test and tweak (see below for a suggestion to improve that
    and completely eliminate RPi network dependency).

    It's
    difficult to look this "gift horse in the mouth", but the introductory
    articles were all about how this is a revolutionary approach to
    intrusive devices. Much follow-up is needed to realize that goal. For
    now, Alias doesn't appear usable except by those who can muster up time
    and money to overcome the obstacles. Suggestions for the team:
    -
    Get rid of the cute moldy look. A simple tube should do the trick and
    might even be better (for example, a small amount of acoustic foam would
    reduce false triggers). If I manage to get a top to fit the Dot, I'll
    submit it. Same for code fixes.
    - Verify the STL files and modify them so they are printable without trickery
    - Improve the installation notes, separately by host platform if possible
    - Verify the app still works with the latest libraries and RPi images (including ssh)
    -
    Consider adding a small switch to press for training, and perhaps a
    few hidden LEDs to prompt the user when
    training. This would get rid of the quirky cell phone trainer link, the need for
    ssh or even a network, etc etc

    0
    None
    KeithD2

    6 weeks ago

    Love this project!
    Is the wake word being processed on the rPi or through the cloud? I am wondering if it is necessary to have the rPi constantly connected to wifi or if it can operate as a stand alone device.
    I have usually connected my rPi to a monitor and keyboard for set up of various projects rather than having to ssh in. Would that be possible with the Alias?

    1
    None
    User_894

    2 months ago

    Hello,
    I have a question regarding the project. The software I have installed on my Raspberry. At first with problems, but now it works. My question now is whether it can be that the servers are down? I tried to access alias via raspberrypi.local:5050 ... unfortunately without success. Is the project still up to date and does someone have a solution?

    3 replies
    1
    None
    hong3User_894

    Reply 2 months ago

    any update on this? would love to find a way to make it work...others having any luck?

    0
    None
    SHadowbaralUser_894

    Reply 2 months ago

    I´m running into the same problem. Seems to be a problem with the DNS. I can connect via Putty only withIP and not the hostname.
    A little nnline resaearch brought me to the conclusion that I should install Bonjour Service on Windows and on the Pi but that did not work for me.

    1
    None
    User_894SHadowbaral

    Reply 2 months ago

    You're right. I also just tried to install "Bonjour" on my windows machine. That worked, but I still could not find the raspberrpi via raspberrypi.local. I also think, since there is no answer here, that this project can officially be regarded as failed ... really a pity.

    0
    None
    SHadowbaralbootstructable

    Answer 2 months ago

    Since the Microphones on the mini are so near to the speaker itself, I don't think that it would sound well.

    0
    None
    steviebevie

    5 months ago

    Great idea! I've tried to get it printed by an online 3d printing company. However, they claim that the base beneath the speaker holder is too thin, so they won't print it. Is there any software that I might use to edit the stl file by making the whole bottom layer of the speaker holder a bit thicker?

    6 replies
    0
    None
    shibadadsteviebevie

    Reply 5 months ago

    I used Repetier to flip the main piece(as shown in this article), adding a brim, then lay the speaker hold flat instead of standing up, and all is well.

    0
    None
    hong3shibadad

    Reply 4 months ago

    Did you print with support or just brim?

    1
    None
    ychselsteviebevie

    Reply 5 months ago

    I printed the Alexa cover at 3D hubs. They had no problems printing it. It just doesn't fit in an echo dot. I don't know the big echo but maybe it is smaller. That was my fault of course but @BjørnKarmann. Maybe you can add a version for the dot as well. Thanks for sharing your project. I did not assemble everyhting yet. Beeing a bit more precise on where you soldered the power supply would be helpfull. I think a simple hole for a micro USB cable plug in the case woudl be the best.

    0
    None
    steviebeviesteviebevie

    Reply 5 months ago

    FYI
    I heightened the base of the speaker holder just a little bit in the Meshmixer app and the 3d printing company happily accepted it. I'll keep you updated on the process.

    3
    None
    JustinSysperto

    Question 4 months ago

    I have now spent countless hours trying to figure out why it's not working for me.
    First the sudo pip3 install tensorflow keras command doesn't work.
    I worked around this by installing tensorflow 1.8.0 manual from lhe lontra on github (newest version could not download) and installing keras seperatly.
    Now I did everything else the same, but I cannot find raspberrypi.local:5050 on my phones browser or anywhere else. Does someone have an Idea?

    0
    None
    Rivale

    5 months ago

    When I do this step:

    pi@raspberrypi:~ $ sudo pip3 install tensorflow keras

    I get this:

    Collecting tensorflow
    Downloading https://www.piwheels.org/simple/tensorflow/tensor... none-linux_armv7l.whl (82.2MB)
    99% |████████████████████████████████| 82.2MB 3.8MB/s eta 0:00:01Exception:
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
    File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in ru n
    wb.build(autobuilding=True)
    File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
    File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare _files
    ignore_dependencies=self.ignore_dependencies))
    File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 620, in _prepar e_file
    session=self.session, hashes=hashes)
    File "/usr/lib/python3/dist-packages/pip/download.py", line 821, in unpack_url
    hashes=hashes
    File "/usr/lib/python3/dist-packages/pip/download.py", line 659, in unpack_htt p_url
    hashes)
    File "/usr/lib/python3/dist-packages/pip/download.py", line 882, in _download_ http_url
    _download_url(resp, link, content_file, hashes)
    File "/usr/lib/python3/dist-packages/pip/download.py", line 603, in _download_ url
    hashes.check_against_chunks(downloaded_chunks)
    File "/usr/lib/python3/dist-packages/pip/utils/hashes.py", line 46, in check_a gainst_chunks
    for chunk in chunks:
    File "/usr/lib/python3/dist-packages/pip/download.py", line 571, in written_ch unks
    for chunk in chunks:
    File "/usr/lib/python3/dist-packages/pip/utils/ui.py", line 139, in iter
    for x in it:
    File "/usr/lib/python3/dist-packages/pip/download.py", line 560, in resp_read
    decode_content=False):
    File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/res ponse.py", line 432, in stream
    data = self.read(amt=amt, decode_content=decode_content)
    File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/res ponse.py", line 380, in read
    data = self._fp.read(amt)
    File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachec ontrol/filewrapper.py", line 63, in read
    self._close()
    File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachec ontrol/filewrapper.py", line 50, in _close
    self.__callback(self.__buf.getvalue())
    File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachec ontrol/controller.py", line 275, in cache_response
    self.serializer.dumps(request, response, body=body),
    File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachec ontrol/serialize.py", line 86, in dumps
    data, separators=(",", ":"), sort_keys=True,
    File "/usr/lib/python3.5/json/__init__.py", line 237, in dumps
    **kw).encode(obj)
    File "/usr/lib/python3.5/json/encoder.py", line 198, in encode
    chunks = self.iterencode(o, _one_shot=True)
    File "/usr/lib/python3.5/json/encoder.py", line 256, in iterencode
    return _iterencode(o, 0)
    MemoryError

    What's going wrong?

    I just followed the steps.. but now I'm stuck...

    Please help....

    1 reply
    1
    None
    RivaleRivale

    Reply 4 months ago

    I found out myself.. memory error..
    I installed it without cache:

    installing without caching:
    pip install --no-cache-dir tensorflow

    if you don't use --no-cache-dir, pip stores the installation files for future use. --no-cache-dir skips that step.