When you’re having trouble cooking and the world isn’t quite futuristic enough to have robot chefs, it’s time to turn to a chatbot. This #MagPiMonday, Rob Zwetsloot samples the menu.
The key to a lot of Italian cuisine is simple, high-quality ingredients combined with precision. The carbonara in Rome tends to be a bit better than the one out of your kitchen, after all. Not all Italians are master chefs themselves though, so Michele Ippoliti has come up with a solution: CarbonaraGPT
“Its goal is to become the Alexa for Romans who are a total mess at cooking,” Michele explains to us. “Essentially, it’s a Python script that records your voice, translates it into text, and asks ChatGPT to provide you with [recipes]. The fact that ChatGPT can respond in any dialect or language makes it all the more fun! For now, I’ve focused on Roman dialect because in Rome, if you ask for any recipe, they explain it to you in a strong dialect, especially in certain neighbourhoods like Trastevere and Torbellamonaca… After producing the response, the text-to-speech plays the answer through the speakers, listing the ingredients and cooking steps. I’ve even made it repeat the steps upon voice request. It’s simple and fun. If you want, it can also send the recipe to you on Telegram.”
Torta di lamponi
Michele loves Raspberry Pi, starting off using it as a retro game console, then a Kodi box, before using it for other projects.
“After a small briefing with [my friend]Lucianone, I started with the software.” Michele tells us. “I realized there were many Python libraries and examples for speech-to-text. I began putting together the script, first testing it on a Windows computer and then on my personal one with Linux. I tried various libraries, and in the end, I bought a used Raspberry Pi 3B… and began testing and modifying the code directly on Raspberry Pi OS, initially with a USB microphone and speakers connected via [the 3.5mm jack]. At one point, I convinced myself that it had to work with Bluetooth speakers with a built-in microphone purchased on Amazon. That’s where the real struggles began! But in the end, I made it work!”
The technical side of the operation is hampered a little by Wi-Fi reception quality and raw power – Michele reckons it would run just fine on a Raspberry Pi 4 as long as your internet connection is strong.
“As a cook, CarbonaraGPT is not great, but still better than those who put cream in carbonara.” Michele admits. “The AI gets confused and believes she’s authorised to add typical Roman ingredients to any dish, just because you asked her to speak in [the] Roman dialect.”
It sounds like progress, but still nowhere near the level of an Italian grandma. As for cream in carbonara as we like to do in the UK, Michele has some parting words: “Sometimes, we’re not entirely aware of our mistakes. Some Italians think that Gigi D’Alessio [a popular Italian singer] is better than Paul McCartney. You folks insist on putting cream in carbonara. Both great mistakes. However, there is room for improvement as long as Gino D’Acampo is broadcast on British TV.”
We agree. And while we’re at it, switch out the spaghetti for tagliatelle or fettucini with your bolognese too.
The MagPi #138 out NOW!
You can grab the brand-new issue right now from Tesco, Sainsbury’s, Asda, WHSmith, and other newsagents, including the Raspberry Pi Store in Cambridge. It’s also available at our online store which ships around the world. You can also get it via our app on Android or iOS.
You can also subscribe to the print version of The MagPi. Not only do we deliver it globally, but people who sign up to the six- or twelve-month print subscription get a FREE Raspberry Pi Pico W!