Artie the AI assistant
By Andrew Gregory. Posted
Andrew Schmelyun set out to create the most impractical AI assistant that he could make, and in the process created this device, which uses a portable TV set and a Raspberry Pi 4 to ask OpenAI for dinner recommendations. We’ve seen AI devices such as this before, and they always seem to veer between the awesome and the useless, but Artie has something that most other AI assistants lack: a face made up of HTML elements, animated by CSS. In case you hadn’t guessed, Andrew is a web developer.
The code for Artie is written entirely in vanilla JavaScript. The front end – the face – is a Safari browser window occupying the full screen of the Sony 510U 5-inch portable television, which Andrew bought for $39.99 on eBay. The audio is transcribed on a Raspberry Pi 4, again using the web browser, as is voice recognition, which comes via the MediaRecorder() constructor.
The transcribed question gets sent to an LLM – Andrew has opted for OpenAI. While code is flying back and forth across the internet, animations in the CSS show a thinking face, and when the text comes back from OpenAI, another browser API, SpeechSynthesis, is used to read it out.
Features Editor Andrew trawls the internet for Cool Stuff while keeping the magazine running smoothly.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
SPOKE review – programmable MIDI controller
An RP2040-powered touch controller for music and a lot more.
Read more →
TinyProgrammer
Want a coding companion? TinyProgrammer lets you watch as it tinkers with Python all day. Sean McManus finds out how it works
Read more →
Make a Smart Home in Raspberry Pi Official Magazine issue 167
The dream of smart, connected devices controlling your home automatically, is especialy appealing on a lazy day when we’re trying to get work done in a heatwave. Maybe this will be the year we finally integrate temperature sensors with fans and a drinks dispenser to keep us cool, or maybe not, but we do know […]
Read more →