Introduction: Make a Smart Speaker With Raspberry Pi for Daily Use

About: An engineer who loves making things

If we make something with Raspberry Pi or Arduino but without a case,most likely we would not use it in everyday life. So when I finished to make a smart speaker with Raspberry Pi, I thought I should make a case for it. Here we go.

Step 1: Prepare Hardware

The hardware includes:

  • Raspberry Pi 3B (or 3B+)
  • ReSpeaker 4 Mic Linear Array
  • 45mm Speaker
  • Laser-Cut Paper Case
  • 2 Nylon Rivets (R3035 or R3045), the diameter of mounting holes is 3mm (ф3). Screws will also work, while rivets is easier to use

Step 2: Make a Paper Case

To use a laser cutter, we need a CAD design file. I learned how to use a CAD software at college, but have not used CAD for many years. Fortunately, it is easy to design a paper case. We only have to know how draw lines and circles. Commercial CAD tools are quite expensive, but for this simple task, the open source CAD tool - LibreCAD is enough to get it done. You can design a unique paper case based on my work.

If you have not used any CAD software, it will take some time to be familiar with a CAD software like LibreCAD. You can also use Python script to genrate the CAD DXF file. Manfred Moitzi's handy Python library - ezdxf will help us to do the design work. For example, to draw an array of speaker holes, using Python script is much easier:

<p>import ezdxf<br>
dwg ='R2007')
msp = dwg.modelspace()
d = 40.
n = int(40 / 1.5)
delta = d / n
start = (100, 100)
msp.add_circle(start, 20)
for x in range(-n, n):
    for y in range(-n, n):
        if y & 1:
            offset = 0.5
            offset = 0
        rx = ((x + offset)**2 + y**2)**0.5
        if rx <= (n/2 + 0.1):
            r = 0.35 # (0.25 * delta * (n/2 - rx) / (n/2) + 0.15 * delta)
            msp.add_circle((start[0] + (x + offset) * delta, start[1] + y * delta), r)

Step 3: Assambling

Step 4: Software

For a smart speaker, the software is the key point. The easiest way is using Alexa Voice Service or Google Assistant SDK. If you want to know how a voice assistant works, you should try MyCroft. Or if you prefer to an offline voice assistant, is a good option. You can find a full list of resources at voice-engine/make-a-smart-speaker.

You can find a step by step guide to setup Alexa Voice Service as a voice assistant at voice-engine/smart_speaker_from_scratch

Multi-Discipline Contest

Participated in the
Multi-Discipline Contest