This Raspberry Pi ghost talks to trick-or-treaters using AI
Nathan from NathanBuildsDIY has crafted a fun and interactive Raspberry Pi-powered Halloween project: an AI ghost named Casper that talks to trick-or-treaters. Instead of being spooky, Casper is friendly and conversational, offering a light-hearted experience. When trick-or-treaters approach, Casper uses AI to detect their presence, listen to what they say, and respond with jokes, answers, and Halloween-themed quips.
The project revolves around a few core components, with the Raspberry Pi 5 at its heart. An ultrasonic distance sensor, cleverly disguised as a bowtie, detects when someone comes close. A microphone captures audio, which is converted into text, and AI processes the input to generate responses. Casper’s “face” lights up with LEDs in his eyes and mouth, making the experience more lively and interactive. The design is housed in a custom 3D-printed frame, which Nathan has made open source for others to replicate.


The software stack involves Vosk for text-to-speech functionality and Google Gemini for AI processing. Nathan provides a detailed breakdown of the project in a video, explaining both the hardware and software components. The source code and 3D printable files are available on GitHub, making it possible for anyone to recreate Casper at home.
For those who want to take a closer look, Nathan has shared a full video on YouTube, complete with a demo and in-depth explanations of how the system works. It’s a great project for Halloween, showcasing creativity and the versatility of the Raspberry Pi.
Read more: This Raspberry Pi ghost talks to trick-or-treaters using AI