Physical computing · Edge AI · 2024–present

Voice-Interactive Hogwarts Sorting Hat

Sorting users into their prospective Hogwarts house!

Handmade voice-interactive Hogwarts Sorting Hat

Re-Engineering Process

We originally built this project with Alan AI for a fun, interactive experience. We have since re-engineered it into a voice-interactive system powered by edge AI.

Now running on a Raspberry Pi 5, the hat uses Whisper.cpp for speech recognition, Piper for text-to-speech, and Llama.cpp for natural language processing. The entire system runs offline using quantized model, demonstrating an alternative to cloud-based AI.

The Original Build

The first version began in a Principles of Engineering class. We designed its interior components in Fusion 360, printed flexible holders on a LulzBot Mini, and built a question flow informed by an analysis of the Pottermore Sorting Hat quiz. The program scored verbal answers across the four Hogwarts houses, handled ties with an additional question, and announced the result to the wearer. We made the hat from scratch, forming the shape with poster paper and stitching fabric and felt.

The build combined code, CAD, 3D printing, audio hardware, and hands-on fabrication. It was presented at a local engineering exposition, published as an Autodesk Instructables tutorial, and featured on the Instructables home page.

Project documentation

Engineering notebook

Current System

  1. 01

    Listen

    Whisper.cpp Transcribes the wearer’s voice locally.
  2. 02

    Reason

    Llama.cpp Interprets responses and generates the conversation.
  3. 03

    Speak

    Piper Returns the hat’s answer through offline text-to-speech.
  4. 04

    Perform

    Physical system Turns the model output into a tangible character interaction.

Watch

See the Sorting Hat in action.

← Back to featured projects