All builds →
Build 01

Teaching our robot to giggle

We wanted our little robot to laugh when it sees you wave. R2-D2's beeps belong to a movie studio, though — so we made our own, for free, with an AI. Here's the whole recipe, and you can do it with any AI app you like.

🕒 ~20 min together 🤖 any AI app 🧒 kids 7+ with a grown-up 💻 one optional tiny script
This series always has the same three parts — the Goal, the Explore (prompts you paste into your AI), and the Output (what you get; press play) — plus an optional bonus at the end, to think about together. Read it on the couch, or build it at the kitchen table. Both count.
1

The goal

Make it laugh

Our desk robot already waves back when you wave at it. The obvious next trick: make it giggle. So we went hunting for a good robot giggle online — and hit our first real lesson. Those famous beeps and boops of R2-D2? They belong to Lucasfilm. You can love them, but you can't just drop them into your own project.

So we did something better: we made our own, from scratch — the AI doing the fiddly math, my kid turning the knobs. Every giggle in this post is 100% ours, and yours to use too.

2

The explore

Three prompts, one silly afternoon

Open whatever AI app you like — ChatGPT, Claude, Gemini, Copilot. Paste these in one at a time. After each, we tell you what to expect and what happened for us. Best part: let the kid do the typing and the tinkering.

① · Paste to your AI
Make your first giggle

Write a short Python script using numpy that synthesizes an original, playful robot "giggle" — a bouncy string of little "hee-hee-hee" beeps that rise in pitch — and saves it as giggle.wav. Add simple comments explaining each part.

What to expect About 30 lines of Python. Got Python? Run it and you have a giggle. No Python? Read it together anyway — beeps in a row, going up, with a wobble is the whole idea. (Our exact recipe is in Part 3 if your AI gets stuck.)

② · Paste to your AI
Now make it yours

Give me three variations by changing the numbers: a cute high giggle, a low cheeky chuckle, and a super-fast titter. Tell me which number controls pitch, which controls speed, and which controls how bouncy it is.

What to expect This is where it gets silly in the best way. Crank the bounce, make it squeaky, make it grumpy. Same recipe → endless different giggles. Kids get this instantly.

③ · Paste to your AI
Or borrow ready-made ones

Point me to public-domain (CC0) sound packs with short robot or interface beeps I can download and use for free — and show me how to check a sound's license before I use it.

What to expect You'll get pointers like Kenney.nl (CC0 game sounds) and Freesound (filter by CC0). Checking the license first is the habit worth teaching.

🧒 Kid's corner — Let them name the sounds and pick the robot's moods. Ours decided "titter" means it's being cheeky and "aww" means it missed us. Naming it makes it theirs.
3

The output

Press play

Here's exactly what we ended up with. Every one is original and free for you to use, too.

Want to make them yourself right now? This is the heart of it — the giggle recipe. Save it as giggle.py, run python giggle.py, and you'll get your own giggle.wav. Change the numbers and giggle again.

import numpy as np, wave

SR = 44100
def beep(freqs, dur, vib=18):
    t = np.linspace(0, dur, int(dur*SR), endpoint=False)
    f = np.interp(np.linspace(0,1,len(t)), np.linspace(0,1,len(freqs)), freqs)
    f = f * (1 + 0.05*np.sin(2*np.pi*vib*t))              # a little wobble = warble
    tone = np.sin(np.cumsum(2*np.pi*f/SR))
    env = np.clip(np.minimum(t/0.006, (dur-t)/0.03), 0, 1)  # soft fade in / out
    return tone * env

parts, base = [], 640
for i in range(6):                                        # six little "hee"s
    f0 = base * (1 + 0.14*i) * (1.1 if i % 2 else 0.9)    # rise + bounce
    parts += [beep([f0*0.9, f0*1.15, f0*0.95], 0.09), np.zeros(int(0.03*SR))]

sig = np.concatenate(parts)
sig = (sig/np.max(np.abs(sig)) * 0.85 * 32767).astype('<i2')
with wave.open('giggle.wav', 'w') as w:
    w.setnchannels(1); w.setsampwidth(2); w.setframerate(SR); w.writeframes(sig.tobytes())
print('wrote giggle.wav  \N{ROBOT FACE}')

Where do they go? Ours now play on the robot the moment it recognizes a wave. Yours could be a doorbell, a Scratch game, an alarm clock that finally makes someone smile — or just a button that giggles.

★

The bonus

Something to think about

This last part isn't about the robot at all, and you can skip it — the giggles work fine without it. But it's the bit that stuck with us longest, and it lands better with older kids. We started this whole thing wanting R2-D2's beeps and couldn't have them. That turned out to be the interesting part.

★ · Paste to your AI
Who owns a sound?

Explain to a 9-year-old: can I use R2-D2's actual sounds in my own robot project? Who owns them? Then explain what "public domain" and "CC0" mean, with a simple example.

What to expect A friendly explainer. The gist: iconic sounds are owned by someone (R2-D2 is Lucasfilm's), but public-domain / CC0 sounds are free for anyone. A surprisingly good dinner-table chat.

Then talk about it:

💡 Today we learned — making our own turned out to be easier than borrowing someone else's, and now nobody can ever ask us to take it down. That's the same reason there's a licence at the bottom of this page: you're welcome to all of it, as long as you say where it came from.