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.
A quick intro to Python – short scripts, rapid results.
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
Counter-rotating clock
Turning a project mishap into inspiration.
Read more →
Spectrum Slit
Not to get all tin-foil hat, but the walls really are talking to us.
Read more →
A Quick Intro to Python in Raspberry Pi Official Magazine 163
Do you want the convenience of artificial intelligence, without signing all of your data over to the business weirdos of Silicon Valley? Well now you can run your own chatbot GPT locally on Raspberry Pi. Keep your data safe from prying eyes by having it never leave your computer! Readers of a certain age may […]
Read more →