We’ve created a tutorial to walk you through building a toy chatterbox — a neat example of what Raspberry Pi Audio Boards can do. We have four different audio boards, but the Raspberry Pi Codec Zero‘s on-board microphone, programmable button, and speaker driver make our smallest one the ideal choice for this application.
What does the chatterbox do?
A random pre-recorded five-second audio clip plays when you press the button. Obviously we chose to record juvenile Beano-grade swear words, such as “nincompoop” and “numpty”, which can then be played as colleagues and esteemed visitors to Pi Towers walk past the desk that’s home to our chatterbox.
Depending on how liberal your workplace is, you could record an NSFW version. Or a much more pleasant one that shouts “treat!” or “walkies!” to wind up your dog. We named this build a chatterbox instead of a swear box so you don’t feel pressured to follow us down a dark path.
How does it work?
To record a sound clip, hold the button down for ten seconds and wait for a burp sound. When you hear it, say what you want to record out loud, then release the button. Holding the button down for more than 20 seconds will play a second burp sound, and then erase all your previous recordings.
Codec Zero plays the recorded audio via a small speaker. We used this 3″ one, which costs just £3 from Pimoroni. All of the hardware lives in a transparent laser-cut box so you can see what’s going on inside. A quick press on a push button makes the audio clips play. We chose a fancy illuminated one but you can decide what kind of buttons and boxes fit your aesthetic needs. I wanted to stuff the perspex box full of flashing battery-powered fairy lights, but it is displayed in a communal area so I had to “compromise” and “dial it down a bit” and “not choose anything too annoying”.
To learn how to assemble and code your chatterbox, jump to this point in our audio board documentation for a full tutorial.
Meet our other audio boards
While we have favoured Codec Zero for this particular project, that doesn’t mean we don’t love all of our audio boards equally. There are three others available and we’d like you to meet them:
- Raspberry Pi DAC+
A high-performance audio HAT that delivers full high definition stereo analogue audio
- Raspberry Pi DAC Pro
Our highest-fidelity audio HAT, providing an outstanding signal-to-noise ratio
- Raspberry Pi DigiAMP+
An audio output HAT with integrated stereo amplifier, ideal for Raspberry Pi hi-fi systems