An I2S microphone on Stackr streams sound to a desktop application. The application turns that sound into text, recognizes a spoken instruction, and tells the robot what to do.
In the spirit of the Full Self Drive (FSD) project I wanted my Stackr robot to get voice control as well. Using a INMP441 microphone I gave the robot “ears”. With a similar architecture to the FSD project I created an audio stream over WiFi from the microphone to the desktop. Running a voice to text AI application on the desktop I was able to understand the commands coming from the robot and control it accordingly. This project was a good opportunity to learn about I2S digital audio interface and how to add another AI capability to Stackr.
| ISSUE | SOLUTION |
|---|---|
| Response time was too long | Simplified the commands the robot is responding to. Reduced the timeouts in the recording process. Used a simplified model. |
| Motor noise was interfering with the microphone | Run robot at lower speeds. Filtered the motor noise in software. |
| Switching to a simplified model introduced errors in transcribing the sound. | We observed that errors were contained though (eg. GO command produced either: “go”, “no” or “so” transcriptions. As a result I changed the algorithm to react to all of those considering that was not intersecting with responses for the other desired commands. |
| How to stream I2S signal over TCP | A TCP pipe was implemented to stream the sound continuously and not in chunks as originally done. |
The microphone mounted on Stackr.
The I2S microphone in its printed frame, wired to the controller on Stackr.
A I2S digital microphone is used to digitize sound and make it available to the Stackr's MCU. A mount that make the microphone point in any desired angle was created to hold it.
Similar to Full Self Driving project this project relies on AI to convert sound to text.
Because Arduino MCU onboard of Stackr is underpowered for significant AI tasks a distributed architecture is used. The microphone streams the digital audio from the phone to a desktop app. The desktop application runs the AI and sends instructions to Stackr using TCP over WiFi.
To send the audio from the microphone to the MCU I2S is used. From Stackr to the desktop the communication is done using TCP over WiFi.
The I2S microphone, the printed mount, and the frame on Stackr.
FreeCAD parts for the blue microphone frame: side plates, cross bar, and round cover.
Blue printed side frames, cross bar, and cover, laid out with the round microphone board and header pins.
INMP441 pressed into the blue bar, with the colored ribbon cable plugged into its header.
Blue frame screwed together, with the microphone cable hanging from the top bar.
Blue frame bolted over the white Stackr, with the microphone cable plugged into the Nano ESP32.
12 photographs and drawings from this build.
| PARAMETER | SPECIFICATION / VALUE |
|---|---|
| Microphone | INMP441 |
| Communication | I2S |
| CAD Software | FreeCAD |
| Manufacturing | 3D Printing |
| Algorithms | AI |
| Communication | WiFi/TCP |