04/16/2019 at 04:18 •
Last time I used Microsoft's 3D Builder to make a 3D model. The 3D Builder is a handy tool and very easy to learn, but it lacks some functions. So I switched to Blender.
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing and motion tracking, even video editing and game creation.
The story of Blender is very interesting and inspiring (youtu.be/qJEWOTZnFeg).
04/11/2019 at 11:01 •
We designed a new mic array to build an open source smart speaker, you may wonder what it looks like. So we created a simple 3D model to show a preview of the smart speaker. The model is created with 3D Builder of Windows 10. You can find the model at https://cdn.hackaday.io/files/1642217026031264/speaker1.3mf
Top view - 4 R/Y/G/B LEDs, 1 touch pad
04/09/2019 at 05:00 •
This is a presentation of this project for a hackaday event at Chaihuo Maker Space. It is worth sharing it here. You can also find the .pptx file at https://cdn.hackaday.io/files/1642217026031264/Smart%20Speaker%20from%20Scratch.pptx
As an engineer, I always enjoy finding ways to complete a task. For me, the current task is making an open source smart speaker.
There are lots of existing smart speakers in the market. They are well-designed products. But they have two common issues. One is that they are always-listening black boxes, which scares many people. The other is that their functions is limited by their vendors. Smart speakers have very powerful ARM processors. They are just like smart phones with touch screens. Smart phones have so many apps, but smart speakers only run one app. Amazon Echo only has Alexa, Google Home only gets Google Assistant. We have no access inside of the smart speakers. We can't install any app on them.
Maybe we can do the same to a smart speaker.
But it's a little bit different. Although Amazon released Echo's source code, it's extremely hard to hack a Echo device. For the 2015 and 2016 edition of the Echo, we can boot it from an external SD to hack it. For the latest Echo, it have been fixed.
For most of us, hacking an existing smart speaker is harder than making a new one. So why not make an open source smart speaker from scratch.
To find out what we need to do, we should learn how a smart speaker works.
These can be divided into 3 parts: hardware, software and document.
Figure out what we need to do, then we can just find a way to do it.
The first prototype is made with Raspberry Pi, ReSpeaker 4 Mic Array and a 45mm Speaker. The cost is a little high.
Looking forward to your feedback! We can also follow or join the project on hackaday.io or github.
03/25/2019 at 15:39 •
The first prototype based on ReSpeaker 4-Mic Linear Array has an issue that its microphones and FPC connector are on top of the PCB. It's not easy to attach the mic array to the case.
Besides, we want a cheaper, more compact and lower power consumption option.
So we just designed a new mic array. It works with NanoPi Neo Air, which is cheaper and lower power consumption than Raspberry Pi
The initial thought was like:
There are 4 microphones, 3 LEDs and 2 mounting holes. The mounting holes are also touch pads which can be used with metal screws as touch buttons. While it was hard to place all the components with this design, so we made some adjustments.
The new design is:
There are 4 microphones, 4 LEDs and 2 mounting holes and 1 touch pad + mounting hole.
You may notice that "VOICEN - Linear 4 Mic Array" is on the PCB, which is the product name.
We got the design work done at March 19th, and sent the gerber files to makerfabs, which provides PCB prototyping service at March 20th.
Today, we got the PCBs!!!
Based on the date on the packages, we can find that the PCB manufacturing process was actually super rapid. Its delivery took most of the time.
Do you like the design or the name "VOICEN - Linear 4 Mic Array"? Just leave a comment here.
03/20/2019 at 14:18 •
This is a paper case smart speaker made with Raspberry Pi and ReSpeaker 4 Mic Linear Array. See also on Github
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.
Raspberry Pi and ReSpeaker 4 Mic Linear Array can be found at Seeed Studio, and we get the 45mm speaker and nylon rivets from Alibaba or Taobao.
Design 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 circels. 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.
The Python script is like:
import ezdxf dwg = ezdxf.new('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 else: 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 + (x + offset) * delta, start + y * delta), r) dwg.saveas('speaker_hole.dxf')
The output will be:
We can use both LibreCAD and Python script to make a complex design.
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. If you prefer to offline voice assistant, Snips.ai is a good option. You can find a full list of resources at voice-engine/make-a-smart-speaker.
- 03/18/2019 at 06:42 • 0 comments
03/11/2019 at 05:58 •
To make a smart speaker, the first thing to do in terms of software is to learn how to record & play audio. See the detail on Github
03/08/2019 at 04:38 •
A smart speaker should not only work with Internet, but also work when offline. The ARM processors of most smart speakers are powerful enough to recognize voice commands offline. Here is a demo of how an offline + online voice assistant (Chinese version) looks like.
The conversation is:
Human : 开灯 ( lights on )
Speaker : ( recognized it offline and turned on the Mi LED Desktop Lamp through local network )
Human : 几点了 ( what's the time )
Speaker: 现在是19点34分 ( it's 19:34 )
Human : 小呆小呆，20/3 等于多少 ( "a hotword", how much is equal to 20/3 )
Speaker: 20/3等于6.667 (20/3 is equal to 6.667)
"开灯 ( lights on )" and "几点了 ( what's the time )" are voice commands which are recognized offline. When a hotword is detected, it will enable online voice service to handle the conversation.
In this demo, I use chumenwenwen's SDK for offline speech recognition and use dueros as the online voice service.
The source code is https://github.com/voice-engine/wenwen/blob/master/alpha.py
Thanks to https://github.com/skorokithakis/python-yeelight that we can control the Mi LED Desktop Lamp through local network.
Next step is to make an English version. Stay tuned!