CarbonaraGPT helps with cooking | #MagPiMonday

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

The project uses ChatGPT to give instructions in a Roman Italian dialect
The project uses ChatGPT to give instructions in a Roman Italian dialect

“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.

A Bluetooth mic and speaker carry the instructions to and from the user
A Bluetooth mic and speaker carry the instructions to and from the user

“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.

Cooking sins

“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.”

A recipe in action – complete with Roman Italian

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.

the magpi magazine issue 138 cover

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!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Server Status

Aradippou Chat Larnaca Nicosia

Chat Links

Official Links.

Chat.

Alternative Mirror Links.

1. KiwiIRC 1.
2. KiwiIRC 2.

Other Web Clients.

1. IrcCloud.

Recent Posts

Related Posts:

Archives

Follow me on Mastodon

Super Club Radio

Mighty Deals

CyIRC

CyIRC Tweets