I decided to house my voice assistant in this cool antique bakelite radio that I found at an estate sale. (The radio was in pieces and non-working, so it was a perfect candidate for my project.) I also upgraded the Raspberry Pi Zero W to a Pi 3 B+ which runs my code a bit better without getting too hot.
After removing the radio’s internals and giving the case a thorough cleaning, I mounted the components to an aluminum board using standoffs and then mounted the board in the radio with more standoffs. I think the end result looks great on my desk, and you can still see the LEDs through the original cloth speaker cover.
0 Comments
I have made some progress with my Python voice assistant. I have it running on a Raspberry Pi Zero W with an Adafruit Voice Bonnet. The code doesn’t run as fast on the Pi Zero as it does on my pc, and it runs a little hot, but it does work. I’ll experiment with a Pi 3B+ later to see how the performance differs. I’ve added the code to GitHub for anyone interested.
I still need to create the JavaScript side of things to give the assistant more utility. And I need to build an enclosure for it, but sadly my ancient 3D printer has just shuffled off its mortal coil, so until I can afford a new printer the enclosure will have to wait.
I use my Alexa Echo devices daily for various purposes. While I find it incredibly useful, Alexa does have limitations, and it would be great if it were more customizable. I decided to try making my own voice assistant that I can fully customize to my needs. I attempted this many years ago when I was first learning how to code, and mostly failed. At the time, the only method available to me for speech synthesis was to have a database of pre-recorded audio files that I could call when appropriate, and that was very limiting. Now however, there is a nifty text-to-speech conversion Python library called “pyttsx3“. Using this library alongside Google’s cloud speech recognition API (which can be accessed using the SpeechRecognition 3.10.0 library) allowed me to put together a very capable voice assistant. At the moment, the voice assistant only has a few capabilities. It listens for a wake word to activate, and then can give you the current time or date, it can set a timer, it can search Wikipedia to answer questions, and it has some small-talk options. I intend to build in many more features, including fetching news headlines, giving weather forecasts, web scrapping various sites, setting reminders, sending emails, and controlling some of my smart home gadgets. Some of these features are going to require a web server running some custom JavaScript that can gather data from online sources and send that data to my voice assistant via JSON requests. So building the web app that will serve as an API to my voice assistant is one of my next steps. I also want the voice assistant to run on hardware as an IoT device, so that is going to take some tinkering. I have ordered the components I need to build this, and I am waiting for them to arrive. The final step will be deciding what to use to house my project. Maybe 3D printing an animatronic, talking head? Or recreating the Hal 9000? I haven’t decided yet. I just finished turning a Raspberry Pi into my own personal LAMP server. I used hardware I had lying around, including a vintage amber monitor (from the Apple II era). Ran into a few problems, including having to edit the config file to create overscans for fitting the display better on the curved monitor, and it seems a recent OS change makes most tutorials on setting up phpMyAdmin user privileges on a pi wrong now, but I was able to figure it out. Now I have a working server I can SSH into. I consider myself something of a videogame historian: I like to collect and restore vintage computers, and then run original games on the original hardware. One of my recent adventures has been exploring the world of Commodore 64’s. I purchased my first C64 from a local Frameshop that used it as their primary computer for about 32 years, until the store owner recently passed away. The new owner wasn’t interested in using a Commodore as her Point-Of-Sale system, so she sold me the computer and even threw in the POS software (on a 5.25″ floppy) that the previous owner had written himself. Since I now own the only copy of this software, I felt that I should try preserving it. To that end, I began experimenting, and I was eventually able to use a SD2IEC in combination with CBM Command to save a d64 image of the floppy disk onto a SD card. Then, I uploaded the Frameshop POS to Internet Archive. While I was at it, I also uploaded some other obscure C64 files I happen to have in my collection: COSMI Top 20 Tools for Commodore 64/128 (has a neat spinning menu), and MFJ MultiCom64 (software for controlling Ham Radio). This is a simple BEAM robot I built a long while back; it was based on a similar design I came across in an old book. In the book, the components were connected directly together, however I mapped the circuit out and used a copper-clad board and acid to make a proper circuit board.
The robot spins, always looking for the brightest source of light in the room. The circuit is really simple: two IR LEDs detect light. As the LEDs detect light, they act as on/off switches, reversing the flow of electricity to the motor. Developers tend to take their keyboards seriously. I have been using classic buckling spring IBM Model M computer keyboards since I first began programming. These are great to type on, and I still love them (kind of feels like typing on a typewriter), but I decided recently that I should upgrade to a compact keyboard that uses modern mechanical switches. This would give me more space on my desk, and allow for some customization. There seems to be an endless sea of options to choose from, though; the first step in my consumer journey is to narrow my options down to a few top brands, so what is a developer to do? I thought a good way to cut through the clutter would be to scrape the r/MechanicalKeyboards subreddit to see what brands are the most talked about currently. So I wrote a Python script that uses Reddit’s API to scrape the subreddit.
Reddit limits API requests to 1000 posts, so the most current 1000 posts is my sample size. My code outputs two files: the last 1000 posts, and more importantly the comments on those 1000 posts, which ended up being 9042 rows of data. (I posted the files to Kaggle if anyone would like to play with them.) Then I imported my comments dataset into OpenRefine so I could run text filters to find brand names, and I recorded the number of mentions for each brand. Finally, using Tableau, I created a couple of Data Visualization charts to express my findings. Here are the most talked about keyboard brands on r/MechanicalKeyboards currently: I decided to go with the Keychron keyboard that my research found to be the most discussed (and I also added Glorious Panda Switches and HK Gaming PBT Keycaps). Couldn’t be happier; it’s a pleasure to type on.
For a class project, I decided to reimagine Katsushika Hokusai’s seminal “Red Fuji” as ASCII art. Essentially, I wrote a Python script that converted Hokusai’s “Red Fuji” into text art using only the letters in Hokusai’s name. Since different letters have different visual weights, you can use them for gradations of shading. The script converts the image into black and white, then assigns a numerical value to each pixel depending on how dark the shading is. Then it replaces each pixel with the letter assigned to that shade range. I like how it turned out.
This was a fun electronics project that I did a few years ago. I hacked an old Nintendo NES R.O.B Robot to be controllable from a PC via a webpage (I ended up selling the robot to someone who wanted to use it in a commercial).
I used a Teensy micro-controller soldered to the robot’s original circuit board and a bit of code to interpret serial input. Then I made a PHP file that sends serial data to the Teensy’s port and made a gui with a bit of Bootstrap. Here is the code if you’d like to try this yourself: R.O.B. Robot Controller |