Inspiration
As a developer, sometimes the fastest way to find a bug is to say out loud what I thought the code was doing. I wanted something I could talk to while I worked. A rubber duck is great at listening, but I wanted one that could ask, “What happens on the last iteration?”
I also wanted to use it for work. It can be hard to know which details are okay to paste into a hosted assistant, especially when company rules limit where code or data can go. Running the conversation on the headset lets me talk through a problem without sending that conversation to a cloud model.
What it does
Open locally and a tiny duck appears in your room. You can pick it up, pet it, or boop its bill. Give it a swat and it wobbles, quacks, and has something to say about it. When you turn to the actual bug, explain what you expected and what happened. The duck answers out loud with a short question or a concrete check.
I kept a movable chat window nearby because sometimes I want to reread the answer, type a message, or return to a conversation later. Once the models are downloaded, spoken and typed conversations can run offline. Optional web tools still need a connection.
How I built it
I adapted locally’s existing chat and model library for an immersive Meta Quest experience in Unity. I used OpenXR, Unity XR Hands, and XR Interaction Toolkit for input, and UI Toolkit for the spatial chat window. Quest passthrough and environment depth let the real room and the user’s hands obscure the duck when they pass in front of it.
LiteRT-LM and LiteRT-LM Omni run all the models. Whisper transcribes speech locally and Kokoro reads the answer aloud. A spoken turn goes from microphone to transcript to a short reply, all on the headset.
Challenges and what I learned
Grabbing was harder than adding more gestures. The duck used to jump when I let go with one hand after holding it with two. It felt much better once I preserved where the remaining hand was holding it. I also learned that fast inference and steady rendering can compete for the same GPU. The chat model now requests lower-priority GPU scheduling so rendering has room to run.
Credits
Rubber Duck by J-Toastie, licensed CC BY 3.0. Poly Pizza model
